VB and VBA Users Source Code: Swap the left and right mouse buttons over
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Swap the left and right mouse buttons over
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Thursday, June 21, 2001
Hits:
800
Category:
Windows API
Article:
The following function swaps and restores the left and right mouse button functionality. Option Explicit Private Declare Function SwapMouseButton Lib "user32" (ByVal bSwap As Boolean) As Boolean 'Purpose : Reverses or restores the meaning of the left and right mouse buttons 'Inputs : bRestore If True restores the mouse buttons, else swaps them. 'Outputs : If the meaning of the mouse buttons was reversed previously, before the function was called, the return value is nonzero. ' If the meaning of the mouse buttons was not reversed, the return value is zero. 'Author : Andrew Baker 'Date : 25/05/2001 'Notes : Affects all applications Function MouseSwapButtons(Optional bRestore As Boolean = False) As Boolean If bRestore Then 'Restore the mouse buttons MouseSwapButtons = SwapMouseButton(0&) Else 'Swap the mouse buttons around MouseSwapButtons = SwapMouseButton(1&) End If End Function
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder