Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Bring form to the top while main form is hidden

Posted on 2002-05-24
4
Medium Priority
?
158 Views
Last Modified: 2011-04-14
My application's main form is hidden. I need to popup another form and bring it to the top or front of all the other desktop windows that are open. I can't use the application handle and need to find my other form's handle. How would I do this? Thanx in advance.
0
Comment
Question by:skynergy
4 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 7031383
you can set your popup form's FormStyle to fsStayOnTop
0
 

Author Comment

by:skynergy
ID: 7031585
I already had that set and it makes no difference. I will have to use windows api. Any other suggestions?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7031812
what about

TheFormWhichShouldBeOnTop.BringToFront;
TheFormWhichShouldBeOnTop.SetFocus;

meikl ;-)
0
 
LVL 2

Accepted Solution

by:
freshman3k earned 200 total points
ID: 7032518
Hello!

Maybe this should help you:

SetWindowPos(Form2.Handle,HWND_TOPMOST,0,0,0,0,SWP_NOACTIVATE or WP_NOMOVE or SWP_NOSIZE);

Hope this helps! :-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question