Open Another Visio Diagram

S

shashi behari

well, you could catch the event for Double Click ( or Text Edit.. ) on the
shape and then just open another diagrm from file or Documents.Add(...) for a
new one.

the SDK has some examples of using AddAdvise & EventSink to listen and
handle events (look in the code librarian)
 
C

cath1602

I have just done this in my C#/Winforms application with a Visio
ActiveX drawing control. My first problem was capturing a double click
event on a shape. There is no such thing! I got round it by making
dble click on the shape cause another cell to change (I used
EventDrop) and catch the cell change event:

Visio.IVShape p_Shape;
p_Shape.get_Cells("EventDblClick").Formula =
"\"SETF(GetRef(EventDrop),1)\"";

You use AddAdvise and EventSink as in the SDK to capture a cell mod
event (Visio.VisEventCodes.visEvtMod +Visio.VisEventCodes.visEvtCell)
and if it is the EventDrop cell that changed, do what ever you need to
do. In my case I have another windows form containing another ActiveX
component and I pop it up.

Catherine
 

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