views:

564

answers:

0

Ive been using a WIndowsFormHost to host a Windows.Forms.WebBrowser control and adding a event handler to fire when the mouse is clicked on a HTML element inside the control

       ((System.Windows.Forms.WebBrowser)sender).Document.Click -= new System.Windows.Forms.HtmlElementEventHandler(htmlElementClick);

This works well!!!

I want to do the same in a native .Net3.5 WebBrowser control, how?

I can get the HTML document by casing

        var doc = (mshtml.HTMLDocument)myWebBrowser.Document;

and using doc to access the HTML contencts.

But how do I handle a mouse cick on an Element inside the HTML document???