R
Rick Strahl [MVP]
I'm working on an app that's using the WebBrowser control.
I got the control working fine, hooking to the document object. But I've run
into a major issue with hooking the Document events. Whenever I hook any of
the HTMLDocumnetEvent2_Event events like this:
HTMLDocumentEvents2_Event DocEvents = this.Browser.Document as
HTMLDocumentEvents2_Event ;
DocEvents.oncontextmenu += new
HTMLDocumentEvents2_oncontextmenuEventHandler(Browser_ContextMenu);
the browser document becomes unresposinve. The events fire fine and the
Document otherwise works - links highlight, status events fire and I can
select linsk with the keyboard. But all mouse clicks are eaten.
It doesn't matter which event I hook - just to verify I used the onhelp
event instead of one that hooks mouse events. As soon as the event gets
hooked up the mouse clicks die. Take it out - all is well (well within
reason).
Any ideas?
+++ Rick ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
I got the control working fine, hooking to the document object. But I've run
into a major issue with hooking the Document events. Whenever I hook any of
the HTMLDocumnetEvent2_Event events like this:
HTMLDocumentEvents2_Event DocEvents = this.Browser.Document as
HTMLDocumentEvents2_Event ;
DocEvents.oncontextmenu += new
HTMLDocumentEvents2_oncontextmenuEventHandler(Browser_ContextMenu);
the browser document becomes unresposinve. The events fire fine and the
Document otherwise works - links highlight, status events fire and I can
select linsk with the keyboard. But all mouse clicks are eaten.
It doesn't matter which event I hook - just to verify I used the onhelp
event instead of one that hooks mouse events. As soon as the event gets
hooked up the mouse clicks die. Take it out - all is well (well within
reason).
Any ideas?
+++ Rick ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/