开发者

Check which mouse button was "upped"

开发者 https://www.devze.com 2023-02-21 04:57 出处:网络
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:

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

精彩评论

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

关注公众号