A character key is pressed.
| C# | void object_KeyPressEvent(object sender, AxSftDateLib20._ISftCalendarEvents_KeyPressEvent e); |
| VB.NET | Private Sub object_KeyPressEvent(ByVal sender As Object, ByVal e As AxSftDateLib20._ISftCalendarEvents_KeyPressEvent) Handles object.KeyPressEvent |
| C++ | void OnKeyPressobject(short* KeyAscii); |
| C | HRESULT OnKeyPressobject(short* KeyAscii); |
object
KeyAscii
The character typed. Setting it to 0 suppresses the character; setting it to another character replaces it.
The KeyPress event occurs when the user types a character while the control has the input focus. p Characters typed into the text box of a date field control's free-form editing (EditStyle) don't raise the KeyPress event; the KeyDown event occurs for their keys. p Use the KeyDown and KeyUp events to handle keys that don't produce characters, such as function keys and navigation keys.
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
Private Sub sftCalendar_KeyUpEvent(sender As Object, e As _ISftCalendarEvents_KeyUpEvent) Handles sftCalendar.KeyUpEvent
LogEvent(sender, "KeyUp", "KeyCode=0x" & e.keyCode.ToString("X2") & " Shift=" & e.shift)
End Sub
See Also SftCalendar Object | Object Hierarchy | Keyboard Interface