Wrong browser to front, using custom context menu in IE

T

Tom Kelleher

Folks,

I created a VB 6.0 program that I call from Internet Explorer 6.0
using the standard "custom context menu" technique. (That is,
I created a Registry entry at "HKEY_CURRENT_USER\Software\Microsoft
\Internet Explorer\MenuExt" and so on.)

The setup works nicely, and my VB6 program launches successfully,
except for one thing: Rather often, some other IE window I have open
snaps in front of my clicked-on IE window, and blocks my view.

Example: Say I have Browser A pointed at microsoft.com, and Browser B
looking at ibm.com. Browser A is on the top of my desktop, and
Browser B is buried under other windows and out of sight. Then
I right-click on Browser A and pick my custom menu option.
Browser B jumps to the front, blocks my view of Browser A, and
my VB6 program runs.

(To be clear, I don't know if my program runs first and THEN
Browser B jumps to the front, or vice versa. Both happen
simultaneously, to the human eye.)

Any idea why?

Related problem: Even if I have just one browser open, when I
close my VB6 app, the IE window loses focus and drops to the bottom
of the windows on my desktop. I have put a window.focus command
into the JavaScript file referenced by the MenuExt entry, but
this is obviously a clumsy workaround. I don't know why it would
think to dash off and hide.

Ideas? Suggestions?

- Tom
 
T

Tom Kelleher

Clarification...
Example: Say I have Browser A pointed at microsoft.com, and Browser B
looking at ibm.com. Browser A is on the top of my desktop, and
Browser B is buried under other windows and out of sight. Then
I right-click on Browser A and pick my custom menu option.
Browser B jumps to the front, blocks my view of Browser A, and
my VB6 program runs.

Browser B jumps in front, and the VB6 program runs...but it correctly
performs its functions on Browser A, not on Browser B. The problem
isn't that the VB6 gets "confused" about what it's meant to do...
it's just the display issue of having the intended browser blocked
from view.

- Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top