Vb.net 检查哪个鼠标按钮是;“升级”;

Vb.net 检查哪个鼠标按钮是;“升级”;,vb.net,winforms,visual-studio,Vb.net,Winforms,Visual Studio,嗯,我有一个鼠标按钮启动时的事件处理程序。我想检查哪个按钮是(左还是右)。这是函数定义: Private Sub PictureBox2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseUp 我曾经 e.Button.Left() 若要尝试获取布尔值,但出现错误…请使用 使用 尝试e.Button=Windo

嗯,我有一个鼠标按钮启动时的事件处理程序。我想检查哪个按钮是(左还是右)。这是函数定义:

 Private Sub PictureBox2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseUp
我曾经

    e.Button.Left()
若要尝试获取布尔值,但出现错误…

请使用

使用


尝试
e.Button=Windows.Forms.MouseButtons.Left


试试
e.Button=Windows.Forms.MouseButtons.Left

If (e.Button = Windows.Forms.MouseButtons.Left) Then
    'Do Somthing
End If