Showing Form2  from  Form1

Posted on 2006-11-04
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.


Question by:ernartey
LVL 142

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)
LVL 70

Expert Comment

by:Éric Moreau
ID: 17873427
Hi ernartey,

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


Author Comment

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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

LVL 13

Expert Comment

ID: 17874732
Hi ernartey

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

Accepted Solution

Mohamed Zedan earned 500 total points
ID: 17876016
You should call

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

Expert Comment

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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with AsEnumerable(), LINQ 4 40
VB.Net - KeyPress Event 4 37
cannot connect to sqlserver 8 29
VB.Net/LINQ: ".Contains" condition not finding existing result in MSSQL 16 36
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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