Solved

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

Posted on 2013-12-06
5
252 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 74

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 74

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

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

13 Experts available now in Live!

Get 1:1 Help Now