给你一段代码!
/////////////////////////////////////
Private Sub handling_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
MsgBox(sender.text)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim btna As New System.Windows.Forms.Button()
Dim btnb As New System.Windows.Forms.Button()
AddHandler btna.Click, AddressOf handling_click
AddHandler btnb.Click, AddressOf handling_click
btna.Visible = True
btna.Width = 80
btna.Height = 20
btna.Text = "Button1"
btna.Location = New Point(10, 10)
btnb.Visible = True
btnb.Width = 80
btnb.Height = 20
btnb.Text = "Button2"
btnb.Location = New Point(10, 50)
Me.Controls.Add(btna)
Me.Controls.Add(btnb)