Check which mouse button was "upped"
Well, I have an event handler for when a mouse button is up. I want to check which button was (left or right). This is the function definition:
Private Sub PictureBox2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseUp
开发者_StackOverflow中文版
I used
e.Button.Left()
to try to get a boolean, but I get an error....
use the button property
If (e.Button = Windows.Forms.MouseButtons.Left) Then
'Do Somthing
End If
Try e.Button = Windows.Forms.MouseButtons.Left
:
http://msdn.microsoft.com/en-us/library/system.windows.forms.mouseeventargs.button.aspx
精彩评论