other pop-up blocking bho's cancelling my navigation.



Hello,

My problem is, from inside my BHO I'm trying to open a link in a new
window. I'm doing this via initiating a Navigate2 command with either
the target set to "_blank" or navOpenInNewWindow/0x01 flag set in the
options. On this new window I'm initiall hiding it, setting certain
display options, and waiting for it to load completely before showing
it to the user.

When I do this, many common toolbars (google/yahoo for example) have
pop-up blockers that detect this as a pop-up and close it. My BHO
never receives the NewWindow2 notification, and I can't find a way to
detect the cancellation.

Is it possible to ensure my BHO's NewWindow2 connection gets called
before any other BHO's?

I have tried the following work-arounds without avail:
a) Using IE automation via CoCreateInstance(INTERNET_EXPLORER)
Problem is, mshtml within the control steals focus as soon
as I make this call, I can reset the focus afterwards but it results
in a screen flicker + user loses scrolling, drag/dropping, couple
other UI issues that I have been unable to resolve. Have tried
LockWindowUpdate, AllowSetForegroundWindow, and too many other
approaches to list without success. The focus steal happens exactly
on the CoCreateInstance() call.

b) Hosting the control.

This alleviates the focus problem, but I would like the window to
behave exactly as the users' normal web browser would. I don't want
to inconvenience them in any way. Is there an easy way to mimic/
duplicate what IE does in terms of ensuring all other extensions/bhos
get loaded, setting the window title appropriately, etc. get adhered
to, or is this out of the question?

c) CreateProcess() and friends.

Again, this would also work, but seems like it wastes resources
and there is definitely a delay/period of error where I need to launch
the application and attempt to get a reference to it via
IShellWindows. Again doesn't seem like an elegant solution, if the
browser crashes or anything else could end up with zombiesque hidden
IE's, although so far this is the most managable solution I have came
up with.

d) Fooling popup blockers. Have actually tried simulating clicks,
manually setting SHIFT+CTRL state on keyboard then restoring it,
opening "javascript:void(0);" type urls as destination all without
success for one reason or another, mainly because each one of them
appears to act differently in how they detect/classify windows as pop-
ups. They also do not adhere to IE's registry settings of allowed
popup hosts.

Any ideas or comments appreciated, have been struggling with this
problem for the better part of the day.
.



Relevant Pages

  • Re: xorg & KDE 3.3 startup issues in 5.3 BETA3
    ... > and then KDE 3.3 from the ports. ... I need to type 'startkde' in this window to ... This happens both through kdm and initiating 'startx' from the ...
    (freebsd-current)
  • [NT] Firewall Bypassing With BHO and MSIE
    ... "Internet Explorer is just like any other Win32-based program with its own ... In short, a BHO ... our BHO opens a new MSIE window via the script ... Explorer 4.0 with Browser Helper Objects ...
    (Securiteam)
  • Re: getting bho reference from iwebbrowser2
    ... You can send registered windows message to the window returned by IOleWindow ... You can subclass the window in your BHO to handle registered messages. ... to get a pointer/reference to my BHO's class from the IWebBrowser2 ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Can not bring IE6 window to front
    ... legitimate BHO can cause problems. ... >> New program window appears behind all other open windows ... >>> user accounts I set up on this computer. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • BHO Hangs IE in a specific case
    ... I am attaching My Events to DocumentComplete and ... I can close the popped up IE window after IE hangs. ... BHO both work fine. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)