Processing Ctrl + S etc

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
 
M

Morten Wennevik

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top