Assign control to window


How can I “assign” a label control to a window?

I tried to put this code in the windows open event, but without any luck!

Dim lbl As New Label
lbl.Left = 20
lbl.Top = 100
lbl.Text = “Can you see me”
lbl.Enabled = True
lbl.Visible = True
lbl.Name = “Label1”

You can’t create a control from nothing. The procedure is to place a label on the window at design time. You can place it offscreen if desired. Make it the zero element of a control set. Now you can do my Lbl = new myAbelName and add the other properties to Lbl as you show.

Arhh, thats why I couldn´t find anything about it anywhere. Thanks.