Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET General > Prolems with child forms


Reply
 
Thread Tools Display Modes
  #1  
Old 04-06-2006, 01:51 PM
pieq314 pieq314 is offline
Freshman
 
Join Date: Jan 2006
Posts: 26
Default Prolems with child forms


Hi every one,

I am trying to solve the following two problems without success. I have a parent form (frmParent) and a child forms (frmChild1). frmParent has a menu items (mnuChild1) which opens frmchild.

1. After frmChild1 is opened and minimized, when a user clicks mnuChild1 on the frmParent, I want frmChild1 to be restored. My question is: how do I do that? (In VB6, frmChild1.show will do just that.

2. After frmChild1 is opened and closed (by click x on the upper right corner), how do I reopen this form?

Note:

I declared Dim Child1 as frmChild1 outside the mnuChild_Click routine. If I move Dim Child1 as frmChild1 inside the mnuChild_Click routine, then I will open frmChild1 each time mnuChild1 is clicked (I want only one copy to open at a time).

Thanks a lot for any help.
Reply With Quote
  #2  
Old 04-06-2006, 02:20 PM
reboot's Avatar
reboot reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,612
Default

__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
  #3  
Old 04-06-2006, 06:28 PM
gigemboy's Avatar
gigemboy gigemboy is offline
Centurion
 
Join Date: Oct 2005
Location: College Station, TX
Posts: 156
Default

This is a very handy 3-part article that explains multiple forms in .NET very well, essential knowledge for any beginner.

"Multiple Forms in VB.NET"
http://www.devcity.net/Articles/94/1/multipleforms.aspx
__________________
NOTE: My code will usually get the job done, but it is not the prettiest. If you see of a way to make it more efficient or to look more elegant, please feel free to comment on it :) Im still learning...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->