MouseEvent object (Visio)

The object passed to VisEventProc as the subject of MouseDown, MouseMove, and MouseUp events.


The default property of MouseEvent is ToString. The ToString property returns a string that represents the properties of the MouseEvent object and has the following form, where event code returns the code of the event that fired (MouseDown, MouseMove, or MouseUp) and Window.Caption returns the caption of the window that sourced the event:

event code; Button property value; KeyButtonState property value; x property value; y property value; Window.Caption

For example, if a user clicked the left mouse button near the middle of the drawing page while holding down the Shift key, in response to the MouseDown event, ToString might return 709;1;5;4.3750003+000;4.265000+000;Drawing1.

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


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.