Application shapeadd event

F

Florin Capra

Hello,

Related this event I have a little problem. I would like that this event
to fire only when I drag a shape from stencil to the page.

But I have a function where I add shapes to the page and in this page at
begin I subtracted the event and after I finished the function I add
again the event. My problem that encounter is that the event is fired.
How could I cancel this event for shapes that are not dragged on the
page and are added using Drop function, if is possible ?

Many thanks !

Regards
 
A

Al Edlund

check out the latest visio sdk. In the examples for event handlers it shows
how to differentiate what type of shape drop event you're playing with.
al
 
M

Mark Nelson [MS]

Instead of adding and removing the event from an eventlist, just set a
boolean flag when you are about to programmatically drop shapes. When the
ShapeAdded event fires, check the flag to see if you should ignore the event
or not. Then clear the flag when you are done dropping shapes.

--
Mark Nelson
Office Graphics - Visio
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