IE Browser Helper Object demo (CSBrowserHelperObject)

The code sample demonstrates how to create and deploy a Browser Help Object (BHO). A BHO runs inside Internet Explorer and offers additional services, and the BHO in this sample is used to disable the context menu in IE.

C# (101.9 KB)
16,101 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Why I can't binding my event
    1 Posts | Last post March 26, 2013
    • I implement my event handler according this papaer, but When I try to use it, I meet some trouble. I binding my event function,but this event function isn't invoked
      My code are following:
       HTMLDocument doc = ie.Document as HTMLDocument; (I have get this ie Windows in pervious code)
      CSBrowserHelperObject.HTMLEventHandler handlersa = new  CSBrowserHelperObject.HTMLEventHandler((mshtml.HTMLDocument)ie.Document);
                  handlersa.eventHandler += new CSBrowserHelperObject.HtmlEvent(Mouse_Down);
                  ((mshtml.DispHTMLDocument)doc).onmousedown = handlersa;
       public void Mouse_Down(mshtml.IHTMLEventObj e)
                  e.returnValue = false;
      When I click the element in page, the Mouse_Down wasn't invoked.