Share via


KeyboardEvent Object [Visio 2003 SDK Documentation]

KeyboardEvent
Window

The object passed to VisEventProc as the subject of KeyDown, KeyPress, and KeyUp events.

Version added

2003

Remarks

The default property of KeyboardEvent is ToString. The ToString property returns a string that represents the properties of the KeyboardEvent object, and has the form

event code; KeyCode property value; KeyButtonState property value; KeyAscii property value; Window.Caption

where event code returns the code of the event that fired (KeyDown, KeyPress, or KeyUp) and Window.Caption returns the caption of the window that sourced the event. For example, if a user pressed the "L" key while holding down the SHIFT key, in response to the KeyPress event, ToString might return the following:

713;0;4;76;Drawing1

Use the Application property of the KeyboardEvent object to determine the Microsoft Office Visio instance hosting the object, and use the Window property to determine the Visio window associated with a keyboard event.

Properties | KeyAscii property | KeyButtonState property | KeyCode property | ObjectType property | ToString property | Window property

Parent Objects

Child Objects | Window Object

See Also | KeyDown event | KeyPress event | KeyUp event