Mega Code Archive

 
Categories / VisualBasic Script / Forms
 

Check the mouse button in MouseDown event action listener

Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single)      If Button = 1 Then ' acLeftButton          MsgBox "You pressed the left button."      ElseIf Button = 2 Then 'acRightButton          MsgBox "You pressed the right button."      ElseIf Button = 4 Then 'acMiddleButton          MsgBox "You pressed the middle button."      End If  End Sub