[java] External app opened via web app displays "under" browser window

Started by
2 comments, last by tebriel 18 years, 8 months ago
I'm using a web application to open up the "Imaging" application (that comes with Windows) when you click a button on a web form. This works fine, however when Imaging starts up it is always behind the browser window. Obviously it should really be opened at the top level or at least above the browser window so that you don't need to click the Imaging icon on the taskbar to see the picture being shown. Does anyone have suggestions on how to get around this problem? Any way for Java to influence other application windows, or perhaps force the browser window to display below others?
Advertisement
I have an idea, but it's mostly a hack. If the problem seems to be Imaging opens under the window it was called from, then simply open a small &#106avascript window, open imaging from there then close the window. The result should be that Imaging goes under the temporary window, which is then removed. I have no clue if this is the way it'll work, just an idea which wouldn't be too hard to test out.
Hmm, that's the kind of clever idea I'm looking for...assuming there isn't a "proper" way.

There has to be a good way for Java to do this...
Doesn't quite work that easy afterall. When you close the unwanted second window, it brings the browser back to the top of the stack. Also, you get an annoying small window flash.

I did try using &#106avascript stuff, and I've gotten a 95% reliable method of making the browser stay below the application using window.blur(), but for some reason it isn't entirely reliable. There seems to be a timing issue, probably because there's multithreading going on? So I may need to do some kind of stupid "delayed execution function" hack where blur() is called after a delay, which is pretty annoying. Pretty strange and annoying if there isn't a better way to do this.

This topic is closed to new replies.

Advertisement