Muokkaa

Jaa


KeyboardEvent object (Visio)

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

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 following form, 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:

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

For example, if a user pressed the "L" key while holding down the Shift key, in response to the KeyPress event, ToString might return 713;0;4;76;Drawing1.

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

Properties

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.