Determine if Shift is down?

  • Thread starter Thread starter Ben Dilts
  • Start date Start date
B

Ben Dilts

Using VB.NET, is there a way to determine if the Shift key
is down (or the Control key, etc.)?



~BenDilts( void );
 
Ben,
From a Control (remember Form is derived from Control). You can use the
Control.ModifierKeys property.

Control also has a Control.MouseButtons property to find the state of the
mouse buttons.

These are Shared/Static so they can be used when you do not have an instance
of a Control/Form.

Hope this helps
Jay
 
Hello,

Ben Dilts said:
Using VB.NET, is there a way to determine if the Shift key
is down (or the Control key, etc.)?

\\\
Imports System.Windows.Forms
..
..
..
MsgBox((Control.ModifierKeys And Keys.Shift) = Keys.Shift)
///

Regards,
Herfried K. Wagner
 
Back
Top