ComponentOne List 8.0 for ActiveX
KeyDown Event (TDBCombo)

 

TDBCombo Reference> TDBCombo Events> KeyDown Event (TDBCombo)

KeyDown Event (TDBCombo)

The KeyDown event occurs when the user presses a key.

Syntax

object_KeyDown (KeyCode As Integer, Shift As Integer)

Arguments

KeyCode is an integer or constant representing a Windows key code. For example, the Visual Basic object library provides the constants vbKeyF1 (the F1 key) and vbKeyHome (the Home key).

Shift is an integer that corresponds to the state of the Shift, Ctrl, and Alt keys at the time of the event. The Shift argument is a bit field with the least-significant bits corresponding to the Shift key (bit 0), the Ctrl key (bit 1), and the Alt key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both Ctrl and Alt are pressed, the value of Shift is 6.

Remarks

Event applies to TDBList and TDBCombo controls.

Although the KeyUp and KeyDown events are fired for most keystrokes, they are most often used for:

·      Extended character keys such as function keys.

·      Navigation keys.

·      Combinations of keys with standard keyboard modifiers.

·      Distinguishing between the numeric keypad and regular number keys.

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback