Author Topic: Visio C# and EventSink  (Read 4471 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 5
Visio C# and EventSink
« on: March 20, 2012, 06:15:06 AM »
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