Visio C# and EventSink

Started by RodrigoCampos, March 20, 2012, 11:15:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I implemented an Windows form with eventsink to detect "shapeDeleted" once I just could access to


but I wanna to access to the "afterShapeDeleted", but right now I have two problems:

1- The below code do not work

         pageEventList.AddAdvise((short)Microsoft.Office.Interop.Visio.VisEventCodes.visEvtCodeShapeDelete, eventHandler, "", "");

I'm getting this error:

         {"\n\nAn exception occurred."}

I already tried this(with no success):

         pageEventList.AddAdvise((short)801, eventHandler, "", "");

2- The following code is working, but I don't know how can I return back to my form code to perform some extra code, once the detection is made at "EventSink.cs" class and not on my "Form.cs":

pageEventList.AddAdvise((short)Microsoft.Office.Interop.Visio.VisEventCodes.visEvtShape         + (short)Microsoft.Office.Interop.Visio.VisEventCodes.visEvtDel, eventHandler, "", "");

There is anyway to catch the interruption on my Form.cs?

Thank you in advance,
Rodrigo Campos