EnterScope event

Microsoft Visio Developer Reference

EnterScope event

       

Queued when an internal command begins, or when an Automation client opens a scope using the BeginUndoScope method.

Version added

2000

Syntax

Private Sub Application_EnterScope (ByVal Application As IVApplication, ByVal nScopeID As Long, ByVal bstrDescription As String)

nScopeID

A language independent number that describes the operation that just ended, or the scope ID returned by the BeginUndoScope method.

bstrDescription

A textual description of the operation that changes in different language versions. Contains the user interface description of a Visio operation, or the description passed to the BeginUndoScope method.

Remarks

The nScopeID value returned in the case of a Visio operation is the equivalent of the command related constants that begin with visCmd*.

If you're using Microsoft Visual Basic or Visual Basic for Applications, the syntax in this topic describes a common, efficient way to handle events.

If you want to create your own Event objects, use the Add or AddAdvise method. To create an Event object that runs an add-on, use the Add method as it applies to the EventList collection. To create an Event object that receives notification, use the AddAdvise method. To find an event code for the event you want to create, see Event codes.

If you are handling this event from a program that receives a notification over a connection created with the AddAdvise method, the EnterScope event is one of a group of selected events that record extra information in the EventInfo property of the Application object.

The EventInfo property returns bstrDescription, as described above. In addition, the vMoreInfo argument to VisEventProc will contain a string formatted as follows: [<nScopeID>;<bErrOrCancelled>;<bstrDescription>]

For EnterScope, bErrOrCancelled will always equal zero.