Solved

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

Posted on 2013-12-06
5
256 Views
Last Modified: 2013-12-10
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.
0
Comment
Question by:cmdolcet
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Chris Millard
ID: 39700834
You could use Me.Activate() as the first command when the second form loads.
0
 

Author Comment

by:cmdolcet
ID: 39700850
Is this before the say for example form2.show?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 300 total points
ID: 39700948
Do you have the TopMost property of the second form set to True?
0
 

Author Comment

by:cmdolcet
ID: 39701039
I can check, should I also check to see if I have it set on form form1?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39701046
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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…
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…

680 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