dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: VB4/32,VB5,VB6
Expertise: Intermediate
Nov 11, 2000

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Swap the mouse buttons' behavior and meaning

You can programmatically swap the meaning of the left and right mouse buttons, to account for your left-handed users. All you need is a call to the SystemParameterInfo API function

Private Declare Function SystemParametersInfo Lib "user32" Alias _
    "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
    ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_SETMOUSEBUTTONSWAP = 33

' swap the two mouse buttons
SystemParametersInfo SPI_SETMOUSEBUTTONSWAP, True, ByVal 0&, 0
To restore the regular mouse behavior, you need a second call to the same API function, but passing False in its second argument:

' restore regular mouse buttons behavior
SystemParametersInfo SPI_SETMOUSEBUTTONSWAP, False, ByVal 0&, 0
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date