Login | Register   
RSS Feed
Download our iPhone app
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



Application Security Testing: An Integral Part of DevOps

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

' 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.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date