Solved

Bring form to the top while main form is hidden

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now