Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
About Us Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old March 18th, 2004   #1 (permalink)
General of Tangerines
 
RZetlin's Avatar
 
Join Date: Jun 2001
Location: Defending the Sea
Posts: 3,883
Question VB.NET Showing forms

I'm having an issue with VB.NET where I have two forms.

When I have to make the second form appear from the first form I have to create an instance of it.

Eg.

Dim SecondForm as new frmSecondFrom
SecondFrom.show
Me.Hide

The problem occurs when I close the second form. The first form is still active.

How do I close the first form?
__________________


AMD Athlon 64 3700+ | 2 GB RAM | XFX Nvidia 6800 GS 256 MB XXX Edition | Win XP Pro SP2
RZetlin is offline   Reply With Quote
Old March 18th, 2004   #2 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Dim SecondForm as frmSecondFrom
New SecondFrom.Show

Me think it was how you neee to do it...
you need to call it like a New form when your about to open it,not when you declare it...

Edit: hmmm....when you open the Second one you want the first one to close completly?

Last edited by Chrono Archange; March 18th, 2004 at 11:42.
Chrono Archangel is offline   Reply With Quote
Old March 18th, 2004   #3 (permalink)
&-)---|--<
 
fivefeet8's Avatar
 
Join Date: Apr 2001
Location: Smallville
Posts: 7,577
Use "me.close" instead of "me.hide".
__________________
Play emulated games online
Main Rig||Intel Q6600@3.2 ghertz|4x1gb DDR2 1066|Asrock 1600sli 110db LGA 775|EVGA 8800gtx@620/1450/975|2x Seagate 160gb SATA150 Raid0|250 gb Samsung SATA2 HD|Seagate 7000.10 500gb HD|NEC 3520 4x/8x DVD+R/RW DL burner|Antec TP 650 watt|40" Sony Bravia 1080p|20.1" 5ms LCD 1680x1050 Native|Logitec 5.1 Speaker System w/15" Sub|Dual Boot Winows XP Pro/Vista 64bit||

2nd Rig||Athlon64 x2 3800+|2x1 gig PC3200|BFG Geforce 6800 Ultra OC @450/1250 agp|60 gig Maxtor IDE HD 7200 RPM|40 gig Maxtor IDE HD|Asrock Dual SATA2|Silver Aluminum ATX|17" LCD||

3rd Rig||Athlon Xp 2800+|1.5 gig PC2700|BFG GeforceFx 5900 Ultra OC agp|100 gig Maxtor SATA HD|NF7-s rev2.0|Nvidia Soundstorm MCP|19" CRT||
fivefeet8 is offline   Reply With Quote
Old March 19th, 2004   #4 (permalink)
General of Tangerines
 
RZetlin's Avatar
 
Join Date: Jun 2001
Location: Defending the Sea
Posts: 3,883
Post

Quote:
Originally Posted by fivefeet8
Use "me.close" instead of "me.hide".
That doesn't work.

When I have this code:

Dim SecondForm as new frmSecondFrom
SecondFrom.show
Me.Close

The whole program closes.
__________________


AMD Athlon 64 3700+ | 2 GB RAM | XFX Nvidia 6800 GS 256 MB XXX Edition | Win XP Pro SP2
RZetlin is offline   Reply With Quote
Old March 19th, 2004   #5 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Quote:
Originally Posted by RZetlin
That doesn't work.

When I have this code:

Dim SecondForm as new frmSecondFrom
SecondFrom.show
Me.Close

The whole program closes.
Ok I dont know If its your spelling thats wrong.....
SecondFrom.Show should be SecondForm.Show

And when you open the second form you want the first "main" form to close? and keep only the second opened? and then when the second one closes, do you open the first one back?
Chrono Archangel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 16:54.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5