Swap Mouse Buttons

'Add a module to your project (In the menu choose Project -> Add Module, Then click Open)
'Add 2 CommandButtons to your form (named Command1 and Command2).
'when you will press the first button the mouse buttons will be swapped.
'To swap back, click on the second button (remember to click with the right button,
'because the buttons had been swapped).
'Insert the following code to your module:

Declare Function SwapMouseButton& Lib "user32" (ByVal bSwap As Long)

'Insert the following code to your form:

Private Sub Command1_Click()
SwapMouseButton& 1
End Sub

Private Sub Command2_Click()
SwapMouseButton& 0
End Sub

Go Back