Create Button on click

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:

Code:
        newButton.Select()
        Me.ActiveForm.ActiveControl.Text = "Test"
        Me.ActiveForm.ActiveControl.Location = New Point(100, 100)
        Me.ActiveForm.ActiveControl.Show()
this gives me an error

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!:)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top