Link to home
Start Free TrialLog in
Avatar of keithcsl
keithcsl

asked on

Trapping Windows button

I am not sure if this is an easy task but:

how can i Ā trap the Windows button??

Regards
Keith
Avatar of d003303
d003303

Hum, Windows button ? Do you mean the minimize/maximize buttons on the title bar ?
You mean the new windows button on the keyboard (win95 ,NT)?
I believe, you have to check for the VK_LWin or VK_RWin key.
ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of keithcsl

ASKER

I am so soree but I meant the Windows key on the keyboard. Should have made my question more clearly..

Keith
Keithcsl, the source code I gave you is meant for the windows key on the keyboard!!! The left and the right one!
ZifNab

Oh my, I am sorry for not reading your answer properly. The code works fine. Thanx!

If it is not too much to ask, is there a way to cancel the Keydown event?, ie i don't want the user to be able to press the Windows Key.

Thanx
Keith
Hi Keith,
I don't know really, it seems that the key is directely sended to windows. You can't just assign another value to Key as normally. I'll try to find a solution, but I can't promise anything.