How to tell if Ctrl is pressed ...?

D

Du

How to tell if the Ctrl key is pressed without being inside a
keypress/keyup/keydown event?

I want distinguish between a "click" and a "ctrl+click" on a button.

any suggestion?

thanks
 
V

Vijaye Raji

if (System.Windows.Control.ModifierKeys & Keys.Control == Keys.Control)
{
// Control is pressed
}

-vJ
 

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