browserwindows-7-x64ieaddon

Browser helper object not working properly


Am working on adding addon to IE11 (64bit) in windows7 and followed the below link

Brwserhelperobject

Iam able to see addon in my IE manage addon's but, iam not able to see message box.

Can any one say what iam missing.


Solution

  • In the given link the following event is not triggered some times due to this message box is not popped out

    webBrowser.BeforeNavigate2 += new
            DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2);
    

    so instead of using above event use the below code

     webBrowser.BeforeNavigate2+= WebBrowser_BeforeNavigate2;
    

    which generates a method

     private void WebBrowser_BeforeNavigate2(object pDisp, ref object URL, ref object Flags, ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel)
    {
    

    //write messegebox here }