HeaderPane
Main
Hide
Share Link
Print

KeyDown Event, SftCalendar Object

A key is pressed.

Syntax

C#void object_KeyDownEvent(object sender, AxSftDateLib20._ISftCalendarEvents_KeyDownEvent e);
VB.NETPrivate Sub object_KeyDownEvent(ByVal sender As Object, ByVal e As AxSftDateLib20._ISftCalendarEvents_KeyDownEvent) Handles object.KeyDownEvent
C++void OnKeyDownobject(short* KeyCode, short Shift);
CHRESULT OnKeyDownobject(short* KeyCode, short Shift);

object

A SftCalendar object.

KeyCode

The virtual key code of the key pressed. Setting it to 0 suppresses the key.

Shift

Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down.

ShiftValueDescription
constSftControlShiftMask1The SHIFT key is down.
constSftControlCtrlMask2The CONTROL key is down.
constSftControlAltMask4The ALT key is down.

Comments

The KeyDown event occurs for each key pressed while the control has the input focus, before the control handles the key. For a date field control this includes system keys such as Alt+Down, the keys passed to its open dropdown, and the keys typed into the text box used for free-form editing. p Setting KeyCode to 0 suppresses the key, including the character Windows generates for it. Other changes of KeyCode have no effect. See Keyboard Interface for the keys the controls handle. p To interpret characters, use the KeyPress event.

Examples

VB.NET View entire sample code

    Private Sub sftCalendar_HighContrastChange(sender As Object, e As _ISftCalendarEvents_HighContrastChangeEvent) Handles sftCalendar.HighContrastChange
        LogEvent(sender, "HighContrastChange", "Active=" & e.active)
    End Sub

    Private Sub sftCalendar_DPIChanged(sender As Object, e As _ISftCalendarEvents_DPIChangedEvent) Handles sftCalendar.DPIChanged
        LogEvent(sender, "DPIChanged", "DPI=" & e.dPI)
    End Sub

    Private Sub sftCalendar_KeyDownEvent(sender As Object, e As _ISftCalendarEvents_KeyDownEvent) Handles sftCalendar.KeyDownEvent
        LogEvent(sender, "KeyDown", "KeyCode=0x" & e.keyCode.ToString("X2") & " Shift=" & e.shift)
    End Sub

    Private Sub sftCalendar_KeyPressEvent(sender As Object, e As _ISftCalendarEvents_KeyPressEvent) Handles sftCalendar.KeyPressEvent
        LogEvent(sender, "KeyPress", "KeyAscii=" & e.keyAscii)
    End Sub

See Also SftCalendar Object | Object Hierarchy | Keyboard Interface


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