Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBox.KeyDown Event

A key is pressed.

Syntax

VB.NETPrivate Sub object_KeyDownEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.KeyDownEvent
VBPrivate Sub object_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
C#.NETvoid object_KeyDownEvent(object sender, EventArgumentType e);
VC++void OnKeyDownobject(short* KeyCode, short Shift);
CHRESULT OnKeyDownobject(short* KeyCode, short Shift);

object

A SftBox object.

KeyCode

The virtual key pressed. See your development environment documentation for available key code constants.

Shift

Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The Shift argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed.

ShiftValueDescription
constSftBoxShiftMask1The SHIFT key is down.
constSftBoxCtrlMask2The CONTROL key is down.
constSftBoxAltMask4The ALT key is down.

Comments

The KeyDown event occurs when a key is pressed.

The KeyDown event is generated when the user presses a key while the control has the input focus.

If the control is part of a parent window (form, dialog, etc.) which has a default button (OK, Cancel) and the user presses the ENTER or ESCAPE keys, this event is not generated.

The KeyDown event is never generated for the TAB key.

To interpret keyboard characters (ANSI characters) use the KeyPress event instead.

The key typed by the user can be suppressed by setting KeyCode to 0. It can be modified by assigning a new value to the KeyCode variable.

See Also SftBox Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.