我在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,也不知道爲什麼在我的入口事件之前處理另一個動作。
如果有人有答案或其他實施,請不要猶豫。