Key modifiers

Recently I used PInvoke to check if the SHIFT key was pressed while i was doing a drag operation......

what I should have done then and have done now is

 

[code:c#]

if((Keyboard.Modifiers & ModifierKeys.Shift) != ModifierKeys.None)
  Trace.WriteLine("Shift is pressed");

[/code]

Be the first to rate this post

  • Currently .0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Comments are closed