473,322 Members | 1,431 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,322 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 1135
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.