• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 561
  • Last Modified:

Showing Form2 from Form1

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
ernartey
Asked:
ernartey
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
should it be a dialog form?
> then use f2.ShowDialog() instead of f2.Show()
or a modeless form?
> then use f2.Show(this)
0
 
Éric MoreauSenior .Net ConsultantCommented:
Hi ernartey,

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

Cheers!
0
 
ernarteyAuthor Commented:
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
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!

 
iHadiCommented:
Hi ernartey

use: Form1.Show(Me)  instead of Form1.Show(this) as angelIII suggested
0
 
Mohamed ZedanCommented:
You should call
form2.BringToFront
after form2.show

this should bring the other form to front..
0
 
Éric MoreauSenior .Net ConsultantCommented:
do you have something in the parent form after the call of the Show method?
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now