[program-l] windows forms in .net

  • From: "Justin Daubenmire" <justind@xxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Tue, 12 Dec 2006 05:10:53 -0500

Hi all,

Using vs 2003 and vb.net and had a few questions on windows forms.


I've read up quite a bit on this but wondering what is the best practise.

if I have frmLogon and frmMain I want to unload frmLogon and show frmMain once the user supplies the correct criteria.

For example:

log on click
dim frm as frmMain

' user passed criteria

frmMain.Show()
End Sub

Some say to hide frmLogon and do not unload it.

Some say to place frmMain outside of the sub in frmLogon and make it public to frmLogon.

Some say to create a reference to frmMain and frmLog on in the opposite forms via a member variable.

Once at frmMain, this form will have around 15 forms that it will have to show to the user and the user must interact with. What is the best way to show/hide forms in vb.net? You have to create an instance of each form, understood, but what about showing/hiding forms? Is it that you show/hide it and never unload them from memory until the application exits?

What is the best practise in this routine of things?

thanks!

Justin
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: