P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Oct 10th, 2003 08:16 AM Post subject: Swap Mouse Buttons |
|
|
Add two command buttons (Command1 , Command2) and add the following code :
| Code: | Private Declare Function SwapMouseButton& Lib "user32" (ByVal bSwap As Long)
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA"
(ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long)
As Long
Private Sub Command1_Click()
'swap Left and Right mouse buttons
SwapMouseButton (True)
End Sub
Private Sub Command2_Click()
'set mouse buttons back to normal
SwapMouseButton (False)
End Sub
Private Sub Form_Load()
Command1.Caption = "swap"
Command2.Caption = "unswap"
End Sub |
_________________ No one is completely useless. They can at least be an example of what to avoid. |
|