Detect drag from another document

J

John

Hi there,

Can anyone tell me how I should go about swapping a shape dragged in from a
source document to a shape based on a master in the target document? I was
thinking of using the ShapeAdded event so that I can get the PinX/Y of where
the shape was dropped, delete it and then add a new shape in the same place.

What I'm having trouble with is how to detect whether a shape was dragged in
from another document or if it came from, say, another page within the same
document?

Any clues?

Thanks

John
 
M

Mark Nelson [MS]

Visio doesn't tell you where shapes come from, so you will have to keep
track of the shapes you already have. You can place an identifier in shapes
after they are added to the page. Then when you handle future ShapeAdded
events, you can look for the identifier and know whether the shape came from
inside or out.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

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

John

Great thanks for the advice Mark.

Mark Nelson said:
Visio doesn't tell you where shapes come from, so you will have to keep
track of the shapes you already have. You can place an identifier in
shapes after they are added to the page. Then when you handle future
ShapeAdded events, you can look for the identifier and know whether the
shape came from inside or out.

--
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