Hi all, i am trying to add a simple label to my form at run-time, i am experimenting with some code and i am wondering whether this is correct as it is not working...
(VB6)
VB Code:
Private Sub Command1_Click() Me.Controls.Add "VB.Label", "Label1" Me!Label1.Caption = "New Label Created At runtime" Me!Label1.Visible = True Me!Label1.Left = 100 Me!Label1.Top = 100 Me!Label1.Height = 25 Me!Label1.Width = 150 End Sub
Where am i going wrong ?




Reply With Quote