recognizing key combinations in a form keypress

Asked By Hari
24-Jan-07 10:24 AM
Hi,

Can any one suggest how to check for the combinations of keys in a
keypress event handler?
I need to check if the key is something like ctrl+'key'. How do i write
the condition for this?? More over keypress event is not firing for the
form. Any idea?


Thanks,

Hari.

Hi,You can use GetAsyncKeyState, it determines whether a key is up or downat

Asked By Fabien
24-Jan-07 02:40 PM
Hi,

You can use GetAsyncKeyState, it determines whether a key is up or down
at the time the function is called.


[DllImport("coredll")]
extern static int GetAsyncKeyState(int key);

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/getasynckeystate.asp

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/
Post Question To EggHeadCafe