Getting the keyboard state (C#)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a MouseDown event, I want to find out what modifier keys are being held down to change the behavior of my program. I can't, however, seem to find a way of doing this. Can anyone offer any suggestions?

Thanks,
Charles.
 
* =?Utf-8?B?Q2hhcmxlcyBSYW5kYWxs?= said:
In a MouseDown event, I want to find out what modifier keys are being
held down to change the behavior of my program. I can't, however, seem
to find a way of doing this. Can anyone offer any suggestions?

Just check out 'Control.ModifierKeys'.
 
Hah, should've known I was missing something obvious. Checking the 1.1 Framework documentation again though (windows help version; not online), ModifierKeys isn't listed under the Form class, only under the Control class.

That's a crappy oversight.

Thanks though!
 
Back
Top