27-04-13, 11:21 AM
اسف على الخطأ الي حدث تفضل هذا الكود الصحيح
[url]Public Class Form1
Dim Frm As New Form
Dim btn1 As New Button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With Frm
.ShowIcon = False
.Width = 385
.Height = 166
.Show()
End With
With btn1
.Text = "OK"
.Width = 108
.Height = 23
.TabIndex = 1
.Location = New Point(259, 103)
End With
Frm.Controls.Add(btn1)
AddHandler btn1.Click, AddressOf btn1_Click
End Sub
Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Frm.Width = 400
Frm.Height = 300
End Sub
End Class[/url]
وبالتوفيق
[url]Public Class Form1
Dim Frm As New Form
Dim btn1 As New Button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With Frm
.ShowIcon = False
.Width = 385
.Height = 166
.Show()
End With
With btn1
.Text = "OK"
.Width = 108
.Height = 23
.TabIndex = 1
.Location = New Point(259, 103)
End With
Frm.Controls.Add(btn1)
AddHandler btn1.Click, AddressOf btn1_Click
End Sub
Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Frm.Width = 400
Frm.Height = 300
End Sub
End Class[/url]
وبالتوفيق

