all groups > c# > january 2005 >
You're in the

c#

group:

How to tell if Ctrl is pressed ...?


How to tell if Ctrl is pressed ...? Du
1/25/2005 11:54:53 PM
c#:
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

Re: How to tell if Ctrl is pressed ...? Vijaye Raji
1/26/2005 12:25:53 AM
if (System.Windows.Control.ModifierKeys & Keys.Control == Keys.Control)
{
// Control is pressed
}

-vJ


[quoted text, click to view]

Re: How to tell if Ctrl is pressed ...? Du
1/26/2005 9:22:48 AM
Thanks, that's exactly what i need!


[quoted text, click to view]

AddThis Social Bookmark Button