KeyDown

Description

Indicates a key was pressed.

Syntax
Private Sub object_KeyDown KeyCode ShiftState

ParameterDescription
KeyCode A Long value specifying a key code, such as vbKeyF1 (the F1 key) or vbKeyHome (the HOME key). To specify key codes, see the Visual Basic documentation.
ShiftState A Long value specifying 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.

Remarks

This event is called when the control has focus and a key is pressed.

This event is called only if SendKeyboardEvents is True.

See Also

KeyUp, KeyPress, SendKeyboardEvents

Return to Player Control Reference.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.