A key is pressed.
| C# | void object_KeyDownEvent(object sender, AxSftDateLib20._ISftCalendarEvents_KeyDownEvent e); |
| VB.NET | Private Sub object_KeyDownEvent(ByVal sender As Object, ByVal e As AxSftDateLib20._ISftCalendarEvents_KeyDownEvent) Handles object.KeyDownEvent |
| C++ | void OnKeyDownobject(short* KeyCode, short Shift); |
| C | HRESULT OnKeyDownobject(short* KeyCode, short Shift); |
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.
| Shift | Value | Description |
|---|---|---|
| constSftControlShiftMask | 1 | The SHIFT key is down. |
| constSftControlCtrlMask | 2 | The CONTROL key is down. |
| constSftControlAltMask | 4 | The ALT key is down. |
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.
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