473,395 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

begginer

Hi,

I have got 2 forms... frmHome and frmMain.
to open my frmMain from my frmHome i use the following code

Dim frmMain as new frmMain
frmMain.show

the problem is when i click a button to return me to my
homepage from frmMain a new instance of the homepage is
created rather than just opening the existing one that is
open.

how do i open the one that is currently open?
and how do i close the current form after the new one has
been opened?
Nov 22 '05 #1
1 1141
You need to pass a reference from frmHome to frmMain, so you can re-use it.
For more info on forms, check out following article:
http://msdn.microsoft.com/library/en...adingtonet.asp
Working with Multiple Forms in Visual Basic .NET: Upgrading to .NET
Duncan Mackenzie
Microsoft Developer Network

June 2002

Summary: Describes how working with multiple forms has changed from previous
editions of Microsoft Visual Basic and illustrates several key techniques,
including displaying a second form, changing the appearance of another form,
and using a form as a dialog. (8 printed pages)
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Tonya" <t@a> schreef in bericht
news:01****************************@phx.gbl...
Hi,

I have got 2 forms... frmHome and frmMain.
to open my frmMain from my frmHome i use the following code

Dim frmMain as new frmMain
frmMain.show

the problem is when i click a button to return me to my
homepage from frmMain a new instance of the homepage is
created rather than just opening the existing one that is
open.

how do i open the one that is currently open?
and how do i close the current form after the new one has
been opened?

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mansoor | last post by:
Hi, I'm going to start scripting with PHP. I have a good understading of programming languages and have done it for years. Right now I'm seeking an advice on a book that can get me started...
0
by: Alex Glaros | last post by:
I need help on my basic table connection syntaxt using PHP. I call the php from a web browser url_name_goes_here/test.php. The database name is tennis and the user name is tennis. If I type...
4
by: Player | last post by:
During my setup install of python, I came across an option stating... Compile python files to, .pyc I left it unchecked for now, should I of done otherwise?? As I am a begginer to this, I...
0
by: dhillon2004 | last post by:
Hello All, I am beginer in Perl. I am trying a serial port data logging application. Requirement of my application is that it should be capable of receiving and transmitting on same or diffrent...
4
by: Louise Woodward | last post by:
I am looking for some beginner guide for someone to learn asp - tutorials, examples etc Thanks -- Louise Woodward Opal Telecom Application Team Irlam
1
by: ::::x:::: | last post by:
Anyone want to help me with this?? Even when all condition are met, it drops to the else and doesn't look at the if and else if. Ie. when bet_in = 1 and rullnum is between 0 and 5, it doesn't...
2
by: Emmie | last post by:
hi, i wanted to display the value of my textbox into my msgbox. does anyone know the correct code for this? i have tried..... MessageBox.Show("You are about to insert the product:...
2
by: thecamisland | last post by:
Hello, I'm a begginer. Is this going to work? Dim fm As FirstMenu Class TransHeadInfo Public Function Validate() As Boolean ... fm.Show() ...
13
by: deshix | last post by:
Hi everyone, can you recommend me the best way to learn the PHP? I'm really begginer...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.