SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
A key is pressed.
VB.NET | Private Sub object_KeyDownEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.KeyDownEvent |
VB | Private Sub object_KeyDown(KeyCode As Integer, ByVal Shift As Integer) |
C#.NET | void object_KeyDownEvent(object sender, EventArgumentType e); |
VC++ | void OnKeyDownobject(short* KeyCode, short Shift); |
C | HRESULT OnKeyDownobject(short* KeyCode, short Shift); |
object
KeyCode
Describes 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.
Name | Value | Description |
---|---|---|
constSftButtonShiftMask | 1 | Shift |
constSftButtonCtrlMask | 2 | Control |
constSftButtonAltMask | 4 | Alt |
The KeyDown event occurs when a key is pressed.
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.
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 variable.
See Also SftButton Object | Object Hierarchy