Raised when the user presses a key.
SyntaxVB6
Copy Code
|
|---|
Public Event KeyDown |
Event DataParameter | Type | Description |
|---|---|---|
keyCode | [input] long | The virtual key code. |
shift | [input] long | The state of the modifier keys - SHIFT, CTRL, ALT. |
Dispatch ID: 22
RemarksRaised when the user presses a key. The event corresponds to the WM_KEYDOWN Windows message, and is actually triggered by it. The second parameter is a bit-mask exposing the state of SHIFT, CTRL and ALT keys, through the first, second and third bit respectively. You might check the state like this:
VB
Copy Code
|
|---|
' Use bit masks to determine which key was pressed. |
See Also