Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I know if mouse is left-hand ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00227856
Message ID:
00227913
Views:
23
>>>Hi to all,
>>>
>>>I want to give to my forms a more user friendly interface, I want to enabled my forms to change position to controls when the user is left-handed, because I think that with a left-handed mouse it's more difficult to click on some position than with a right-handed mouse. So how can I know if the user have setted in control panel the left-handed mouse ?
>>>
>>>TIA
>>Hi Renato,
>>
>>As Michael mentioned the value is stored in the registry. An easy way to retrieve the value is:
>>#DEFINE SM_SWAPBUTTON 23
>>DECLARE INTEGER GetSystemMetrics IN Win32API;
>>  INTEGER nIndex
>>lnresult = GetSystemMetrics(SM_SWAPBUTTON)
>>? lnresult && 0 if right handed, otherwise left
>>hth,
>
>PMFJI, but I have to ask: Isn't this a function of the OS? If I go to the Control Panel and tell Win95 to swap mouse buttons (switch from right-handed to left-handed) can an application tell the difference? That is, if I've switched to left-handed mode and left-click a button, doesn't it show up as a plain 'click' to the app?

Hi Paul,

Yep, this is a function of the OS. However, Windows handles the mouse clicks through its messaging services. If the mouse buttons are swapped, the application doesn't know, but responds in the proper manner. IOW, if the mouse is set up to be left-handed and you click the left mouse button, the application will react as it would if the mouse was set up as right-handed, and the right mouse button was clicked.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform