多个button事件,如何判断哪个被点击 5
PrivateSubButton1_Click(senderAsObject,eAsEventArgs)HandlesButton1.Click,Button2.Clic...
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, Button3.Click
End Sub
上述过程中,如何判断哪个button被点击,谢谢! 展开
End Sub
上述过程中,如何判断哪个button被点击,谢谢! 展开
2个回答
展开全部
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, Button3.Click
Select Case sender.Name
Case "Button1"
MsgBox("第一个按钮")
Case "Button2"
MsgBox("第二个按钮")
Case "Button2"
MsgBox("第三个按钮")
End Select
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询