Dim MyBtnGroups As New ArrayList
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For i As Int16 = 0 To 5
Dim Btn As Button = New Button
Btn.Left = 0
Btn.Height = 30
Btn.Top = i * 30
Btn.Text = "> " & i.ToString
Me.Controls.Add(Btn)
MyBtnGroups.Add(Btn)
AddHandler Btn.Click, AddressOf ButtonGroups_Click
Next
End Sub
Private Sub ButtonGroups_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim T As String
T = CType(sender, Button).Text
MsgBox(T)
End Sub
End Class
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |