Bring form to the top while main form is hidden

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.
skynergyAsked:
Who is Participating?
 
freshman3kConnect With a Mentor Commented:
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
 
DragonSlayerCommented:
you can set your popup form's FormStyle to fsStayOnTop
0
 
skynergyAuthor Commented:
I already had that set and it makes no difference. I will have to use windows api. Any other suggestions?
0
 
kretzschmarCommented:
what about

TheFormWhichShouldBeOnTop.BringToFront;
TheFormWhichShouldBeOnTop.SetFocus;

meikl ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.