开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜