?
Solved

Showing Form2  from  Form1

Posted on 2006-11-04
6
Medium Priority
?
551 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
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!

 
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 2000 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

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

800 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