How to trap the ShapeDeleted Event in a easy way?

L

lostwings

I have read the reference for Visio 2003 SDK, and found out that there is not
a simple way to capture the ShapeDeleted Event for a visio.Page or
visio.Document object.

The only way in the SDK document is to define a EventSink class which
implements IVisEventProc.VisEventProc interface, and passes an instance of
that class to the EventLists.AddAdvice() method to sink the ShapeDeleted
event.

I really don't want to make life that complex, so my question is if there
is a way to capture the shapedeleted event efficiently? Any help would be
greatly appreciated.
 
M

Mark Nelson [MS]

Use BeforeSelectionDelete instead. You can look at the shapes in the
Selection object to find out which ones are being deleted. The Before event
is preferable to the "after" event anyway because you can still retrieve
information from the shapes.
 
L

lostwings

Thanks so much.
--
John 3:16


Mark Nelson said:
Use BeforeSelectionDelete instead. You can look at the shapes in the
Selection object to find out which ones are being deleted. The Before event
is preferable to the "after" event anyway because you can still retrieve
information from the shapes.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top