I'm trying to code a button that puts a new label on the form.
I have tried:
VB Code:
Dim lblNew As New Label lblNew.Name = "lblNew" lblNew.Text = "Text" Me.Controls.Add(lblNew)
What is the right way to do this?
Printable View
I'm trying to code a button that puts a new label on the form.
I have tried:
VB Code:
Dim lblNew As New Label lblNew.Name = "lblNew" lblNew.Text = "Text" Me.Controls.Add(lblNew)
What is the right way to do this?
try changing the Top and Left properties so the label is somewhere in the middle of the form and you'll see it
other than that, that's how ya add controls to a form without the designer