Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Fri, 29 Aug 2008 06:51:04 -0700 (PDT),    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


Subscribing HTMLDocumentEvents2 prevents events to be fired to the website   
Subscribing HTMLDocumentEvents2 prevents events to be fired to the
website

Hello,
I'm writing a BHO for IE 7.0.6 on Windows Vista in C# (VS2008). I need
to know when the browser window or a different browser-tab get
activated.
The appropriate events to subscribe to would be HTMLDocumentEvents2
onactivate or onfocusin.  The problem is that when I subscribe to
these events, the webpage displayed in the browser seems dead. All
input elements behave as if the window didn't have focus. So I suppose
the events are just not forwarded to the browser.

I tried setting explicitly IHTMLEventObj pEvtObj.cancelBubble = false
and returnValue = false, without results.
I also tried the workaround described in
http://groups.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/65dd44111edd44ab/307de2bddf724eba?lnk=gst&q=onfocusin#307de2bddf724eba
(using IConnectionPoint.Advise() instead of the += operator for
subscribing to the events). Although it seems to be supposed as a
workaround for this problem, it didn't show any effect at all.

Does anybody have an idea on whats going on there or if I can manually
forward this events to the browser ?

Thanks and kind regards,
Michael Leben
date: Fri, 29 Aug 2008 06:51:04 -0700 (PDT)   author:   Mischka

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us