Solved

Bring form to the top while main form is hidden

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 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