Dynamic creation button

xiaoxiao2021-03-06  65

1, have new button

2, use me.controls.add newbutton to add the button to the control center

Private Sub Button2_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim nb As Button = New Button Me.Controls.Add (nb) nb.Text = "new button" nb.Left = Button2 .Lef nb.top = button2.top button2.height nb.show () End Sub

转载请注明原文地址:https://www.9cbs.com/read-119593.html

New Post(0)