How can I detect if the CTRL key is pressed when User click on a control ?

  • Thread starter Thread starter Steph.
  • Start date Start date
S

Steph.

Hi,

A simple question : How can I detect if the CTRL key is pressed when User click on a control ?

Thanks,

Steph.
 
Check the Control object's ModifierKeys (static) property, e.g.

if((Control.ModifierKeys & Keys.Shift) == Keys.Shift) {
// do something special
}


Marc

Hi,

A simple question : How can I detect if the CTRL key is pressed when User
click on a control ?

Thanks,

Steph.
 
Obviously, Keys.Control (not Keys.Shift) for your case! (clipboard
inheritence at work there folks, sorry...)

Marc
 
Back
Top