Solved

Bring form to the top while main form is hidden

Posted on 2002-05-24
4
154 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 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

861 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