Solved

Showing Form2  from  Form1

Posted on 2006-11-04
6
545 Views
Last Modified: 2010-04-23
Hi Guys :
             I have  form1  and   Form2  in  my visual basic  2005  application  and  when   ever  i  try  to    call   Form2       from  Form1   it   is showed behind  Form1. How  can I solve  this  problem. Regards.

                                                                                                                           Ernest.


                                                                                       
0
Comment
Question by:ernartey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17873417
should it be a dialog form?
> then use f2.ShowDialog() instead of f2.Show()
or a modeless form?
> then use f2.Show(this)
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 17873427
Hi ernartey,

you probably have some some code after calling the show method in form2

Cheers!
0
 

Author Comment

by:ernartey
ID: 17874300
Hi emoreau  

                  It  form2  that  i calling  to   show .The form1  is like parent  form. I will  try  angelIII ode to see  if it  works .Thanks
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 13

Expert Comment

by:iHadi
ID: 17874732
Hi ernartey

use: Form1.Show(Me)  instead of Form1.Show(this) as angelIII suggested
0
 
LVL 7

Accepted Solution

by:
Mohamed Zedan earned 500 total points
ID: 17876016
You should call
form2.BringToFront
after form2.show

this should bring the other form to front..
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 17876404
do you have something in the parent form after the call of the Show method?
0

Featured Post

Industry Leaders: 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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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