Sintoras
Shaaakaa!
- Reaction score
- 45
I have made a form in which I can move around component freely and now I would like to make button which creates another button or a textbox or whatever.
How do I do that? I've googled and not found anything and i played around myself. My best try was this:
this gives me an error
and
and here nothing happens...
I'de appreciate a rather simple answer since I'm not that great a VB but I something more complicated will be ok too.
Thanks!
How do I do that? I've googled and not found anything and i played around myself. My best try was this:
Code:
newButton.Select()
Me.ActiveForm.ActiveControl.Text = "Test"
Me.ActiveForm.ActiveControl.Location = New Point(100, 100)
Me.ActiveForm.ActiveControl.Show()
and
Code:
Dim newButton As Button
newButton = New Button
newButton.Location = New Point(50, 50)
newButton.Show()
and here nothing happens...
I'de appreciate a rather simple answer since I'm not that great a VB but I something more complicated will be ok too.
Thanks!