3 4
An event is an action or occurrence, often generated by a user, that your program might respond to. In Microsoft Visio, events can result from user actions such as opening or closing documents, dropping or deleting shapes on the drawing page, editing the text of shapes, and altering shape formulas. Knowing that such events have occurred can be extremely useful because it allows you to program your solution to respond to user actions that can otherwise be difficult to predict.
You can handle events either programmatically or by using Visio formulas. As with any Visio solution, you should start by putting as much of the functionality as possible in formulas. For details about handling events using formulas, see Chapter 7, Enhancing Shape Behavior.
Visio provides two separate ways to handle events from your program:
For details about handling events in a C++ program, see Chapter 28, Programming Visio with C++.