HeaderPane
Main
Hide
Share Link
Print

SftBox.KeyPress Event

An ANSI key is pressed.

Syntax

C#void object_KeyPressEvent(object sender, EventArgumentType e);
VB.NETPrivate Sub object_KeyPressEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.KeyPressEvent
C++void OnKeyPressobject(short* KeyAscii);
CHRESULT OnKeyPressobject(short* KeyAscii);
VBPrivate Sub object_KeyPress(KeyAscii As Integer)

object

A SftBox object.

KeyAscii

Describes the key pressed using standard numeric ANSI key codes.

Comments

The KeyPress event occurs when an ANSI key is pressed.

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

Use KeyDown and KeyUp events to handle any keystroke not recognized by KeyPress, such as function keys, editing keys, navigation keys, and any combination of these with keyboard modifiers, such as SHIFT, CONTROL and ALT keys. Unlike the KeyDown and KeyUp events, KeyPress doesn't indicate the physical state of the keyboard; it passes a character instead.

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

See Also SftBox Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.