Events to capture drag and drop

A

andrewLLL

Hi,

How to capture the drag and drop to duplicate shapes (while
holding CTRL key) on Visio drawing page? The mouse up event
is not doing as claimed and does not work for this case. If
you don't drag anything the event is fired ok, but it is
useless.

Andrew
 
J

junethesecond

ShapeAdded event to the page might help,
but some other events such as
SelectionChanged method should be combined.
 
A

andrewLLL

Thanks for the suggestion. However ShapeAdded event fires
as many times as the number of shapes being draged and that
is not a good choice to me. BTW with that event I don't
know when the duplication is finished. The selectionchanged
event is just too general.

Andrew
 
J

junethesecond

MasterAdded event might be usefull,
though this is to available to Document
Object.
 
H

Heidi Munson [MSFT]

Try listening to SelectionAdded event and use the IsInScope function of the
application object to determine what action is causing the selection to be
added.
For control drag use IsInScope(visCmdDragDuplicate).

The event monitor tool in the SDK is often a good way to determine what
events you want to listen to and the scope you want to check in your event
handler. Event monitor Enter/Exit scope events. If you just want to
determine the event occurred during a particular action use IsInScope rather
than listening to Enter/Exit scope. The SDK code librarian has a Shape
Added/Deleted Event sample that shows how to use IsInScope with event
handler with the cmdIDs for pasteSpecial and cut.

SDK download available here
http://www.msdn.microsoft.com/office/understanding/visio/tools/default.aspx

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