Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

forcing app to front of the screen

Status
Not open for further replies.

bjornseth

IS-IT--Management
Nov 15, 2002
2
GB
Morning all,

I have a locally hosted j2ee app (specifically using ora9ias) viewed through IE and need to have to either bring a popup display to the front of the screen - that is, in front of any other windows, IE or not.

Obviously the servlets/JSPs won't be able to do this, so I presume that some local applet will be needed that can call the necessary apis...? Can anyone give some guidance on the best way to do this?

Fortunately, the build of the machine is entirely under my control, so anything (pretty much) can be installed, trusted etc.

Thanks!
 
Try the WinAPI function SetWindowPos from "user32
 
By default, each thread has an independent input state (its own active window, its own focus window, and so forth). The SetActiveWindow() function always logically sets a thread's active window state.

To force a window to the foreground, however, use SetForegroundWindow(). SetForegroundWindow() activates a window and forces the window into the foreground. SetActiveWindow() always activates, but it brings the active window into the foreground only if the thread is the foreground thread.


Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top