Ascertain CTRL+SHFT keys pressed during MouseDown event

  • Thread starter Thread starter phcmi
  • Start date Start date
P

phcmi

Within a mousedown event, can you please show a code sample of how to
ascertain whether the CTRL and/or ALT and/or SHIFT keyboard key is pressed?
Thank you
 
Look at the static Control.ModifierKeys property - and remember to
test bitwise appropriately - i.e.

bool shiftPressed = (Control.ModifierKeys & Keys.Shift) ==
Keys.Shift; // shift (and possibly others) pressed

Marc
 
Back
Top