Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

ShiftKeyDown Property

Location

My.Computer.Keyboard.ShiftKeyDown

Syntax

Dim result As Boolean = My.Computer.Keyboard.ShiftKeyDown

Description

The ShiftKeyDown property indicates the current state of the Shift key, whether down (TRue) or up (False).

Usage at a Glance

  • This property is read-only.

  • This property is only valid in non-server applications.

  • For systems with two Shift keys, this setting indicates whether either Shift key is pressed. To examine the state of a specific Shift key during a control event, perform a bitwise comparison of the control's ModifierKeys property with the Keys.LShiftKey or Keys.RShiftKey enumeration value.

Related Framework Entries

  • Microsoft.VisualBasic.Devices.Keyboard.ShiftKeyDown Property

  • System.Windows.Forms.Control.ModifierKeys Property

  • System.Windows.Forms.Keys Enumeration

See Also

AltKeyDown Property, CtrlKeyDown Property, Keyboard Object

Категории