Cut and Paste an Object

S

Sateesh

Hello!

If I cut and paste an object from a Visio page it fires an Add event after a
Delete event. I want to differentiate this Add event with the one that comes
when I add an event from a stencil.

Does anybody know the solution?

Thanks
Sateesh.
 
M

Mark Nelson [MS]

If you listen to the EnterScope and ExitScope events, you can find out what
higher-level operation is causing all the events to fire. You could listen
to EnterScope and watch for a Paste operation. Record the ScopeID for the
operation. Then when handling the Add or Delete events, check
Application.IsInScope using this ID to see if the event is part of the
scope. Zero out the ScopeID when the matching ExitScope event fires.
 
S

Sateesh

Thanks Mark, it worked.


Mark Nelson said:
If you listen to the EnterScope and ExitScope events, you can find out what
higher-level operation is causing all the events to fire. You could listen
to EnterScope and watch for a Paste operation. Record the ScopeID for the
operation. Then when handling the Add or Delete events, check
Application.IsInScope using this ID to see if the event is part of the
scope. Zero out the ScopeID when the matching ExitScope event fires.

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