I need to intercept the textbox click on the DOM in webbrowser control in c#. I searched a lot in the internet and I learned to use mshtml.dll. Includes it in the project and this is my example:
mshtml.HTMLDocument doc;
doc = (mshtml.HTMLDocument)webMain.Document;
mshtml.HTMLDocumentEvents2_Event iEvent;
iEvent = (mshtml.HTMLDocumentEvents2_Event)doc;
iEvent.onclick += new mshtml.HTMLDocumentEvents2_onclickEventHandler(ClickEventHandler);
but when I try to write my code i've got this problem:
*Cannot convert type 'System.Windows.Forms.HtmlDocument' to 'mshtml.HTMLDocument' *
I think the problem is the webbrowser control class, but i don't know why. Any ideas?
Thanks for the help