Processing Ctrl + S etc

  • Thread starter Thread starter Donal Kelly
  • Start date Start date
D

Donal Kelly

Hi,

I'm writing a C# GUI and I'm trying to process the control keys, i.e. CTRL +
S or CTRL + N.
I can process ALT + by using the & key but is there an equilivant for CTRL.

Thanks,
Donal
 
Hi Donal,

In the KeyEventArgs used by KeyDown and KeyUp events there is a Modifiers
property you can use to determine if Ctrl/Alt/Shift is also pressed. You
can also use the Ctrl, Alt and Shift properties directly.

There is a good example on how to use this in the documentation under

KeyEventArgs.Modifiers
 
Back
Top