Aggiungere dinamicamente un controllo







Dim newButton As Button

' Create the new control

newButton = New Button()

' Set it up on the form

newButton.Location = New System.Drawing.Point(184, 12)
newButton.Size = New System.Drawing.Size(75, 23)
newButton.Text = "Button3"

' Add it to the form’s controls collection

Me.Controls.Add(newButton)

' Hook up the event handler.

AddHandler newButton.Click, AddressOf Me.Button_Click










( aggiungeredinamicamenteuncontrollo.html )- by Paolo Puglisi - Modifica del 17/12/2023