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!

Set focus to my application 1

Status
Not open for further replies.

Gigatech

Programmer
Jul 12, 2000
80
CR
Hi, I have my application minimized on the tray bar. When the user presses a combination of keys the application maximizes.

I want the window to appear on the top of the desktop, over any other application running (for example Explorer, Word, etc).

Before I maximize the application I wrote:

SetForegroundWindow(Application.Handle);

sometimes it works but other times the application appears behind the other applications

Any suggestions?

Thanks
 
Set the property FormStyle to fsStayOnTop before showing the form.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top