هذا الكود يقوم بوضع اداة
شغل البرنامج واضغط الكوماند
Private Sub Command1_Click()
On Error GoTo sa
Dim ctl As Control
Dim ctlType As String
Dim ctlName As String
i = i + 1
'ctlType = "VB." & InputBox("Enter the Type of Control")
'ctlName = InputBox("Enter the Name of Control")
Set ctl = Form1.Controls.Add("VB.TextBox", "Text" & i, Form1)
'Set ctl = Form1.Controls.Add(ctlType, ctlName, Form1)
With ctl
.Visible = True
.Top = 800 * i
.Left = 400
.Width = 4000
.Height = 400
.Font.Size = 12
.Text = "Developed By Sachin Dhillan"
.Appearance = 0
End With
Exit Sub
sa:
MsgBox Err.Description, vbInformation, "Error"
End Sub
غير كلمة
vb.textbox
إل اسم الاداة التي تريدها
ويجب وضع كلمة
vb.
بجانب اسم الاداة