Solved

Showing Form2  from  Form1

Posted on 2006-11-04
6
530 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
6 Comments
 
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)
0
 
LVL 69

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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 69

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

15 Experts available now in Live!

Get 1:1 Help Now