好吧,我有一个鼠标按钮启动时的事件处理程序。我想检查哪个按钮(左或右)。这是函数定义:
Private Sub PictureBox2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseUp
我用过
e.Button.Left()
尝试获取布尔值,但是我收到错误....
答案 0 :(得分:3)
If (e.Button = Windows.Forms.MouseButtons.Left) Then
'Do Somthing
End If
答案 1 :(得分:1)
尝试e.Button = Windows.Forms.MouseButtons.Left
:
http://msdn.microsoft.com/en-us/library/system.windows.forms.mouseeventargs.button.aspx