利用c#二次开发visio 添加右键菜单,怎么添加这个菜单的响应事件呢?
const string MenuCaption1 = "Command &100";
// the action for this will be to run the queue er event add-on
// Action: RUNADDONWARGS("QueueMarkerEvent",/RMA_DEMO /CMD=100)
const string MenuAction1 = "RUNADDONWARGS(\"QueueMarkerEvent\",\"" +
ContextRightMouseActionDemo + 
ContextBeginMarker +
ContextCommand + "100\")";if (eventHandler == null) { eventHandler = new EventSink();
applicationEventList = visioApplication.EventList;
        applicationEventList.AddAdvise((short)Microsoft.Office.
Interop.Visio.VisEventCodes.visEvtApp +
(short)Microsoft.Office.Interop.Visio.
VisEventCodes.visEvtMarker,
eventHandler, "", "");
}
AddRightMouseAction(targetShape,MenuCaption1, MenuAction1,  true, true, false, false);
SDK里面有这么的用法,在程序里面这样写之后,发现在AddAdvise之后,代码就不往下执行了。