How to make sure that a form open infront of another form

Is there any catch or any way I can make sure a form being called from the original form always opens up in front of that original form? I sometimes get the second form show up behind the first form?

Thanks in advance.
cmdolcetAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Do you have the TopMost property of the second form set to True?
0
 
Chris MillardCommented:
You could use Me.Activate() as the first command when the second form loads.
0
 
cmdolcetAuthor Commented:
Is this before the say for example form2.show?
0
 
cmdolcetAuthor Commented:
I can check, should I also check to see if I have it set on form form1?
0
 
käµfm³d 👽Commented:
I cannot remember who wins out if two forms have TopMost set, and one form shows the other. If you don't need to be able to access the main form while the second form is displayed, then showing the second form via ShowDialog should give the desired effect (without having to set TopMost). The second form will be modal, so you won't have access to the main form until the second form is closed.
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.