我在C#中用Visual Studio 2010做了一个Visio 2007加载项,下一步是截取“单击超链接”事件。在C#中为Visio加载项拦截超链接事件
由于我的一些超链接的方式不正确,我需要将呼叫重定向到另一个链接。并对待答案。
现在,我这是怎么抓住他们:
//in the opened_Document event
this.Application.EnterScope += new EApplication_EnterScopeEventHandler(Action_When_Event);
//in the main class
private void Action_When_Event(Application app, int scopeID, String description)
{
if (scopeID == 6300) // ID of the hyperlink event
{
// this is where I redirect the hyperlink
}
}
这是可行的。但我不知道如何获取URL,也不知道为什么在我的入口事件之前处理另一个动作。
如果有人有答案或其他实施,请不要犹豫。