[program-l] Re: windows forms in .net

  • From: "Justin Daubenmire" <justind@xxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Tue, 12 Dec 2006 06:54:27 -0500

Hi Germano

thank you for the input.


Regards,
Justin
----- Original Message ----- From: "Germano Carella" <gcarella@xxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Tuesday, December 12, 2006 5:34 AM
Subject: [program-l] Re: windows forms in .net


Hi,
you can show the main form at application startup:

in FrmMain_load subroutine, you can show FrmLogon, that overspreads FrmMain.

In subroutine Logon_click, if the data are correctly been entered, you can call FrmLogon.close().
The form will close and the control returns to FrmMain.
Otherwise, you can set a label text to represent error in data submission with the string LblLogon.text = "error in login, try again" and leave the form active.

Regards,
Germano

----- Original Message ----- From: "Justin Daubenmire" <justind@xxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Tuesday, December 12, 2006 11:10 AM
Subject: [program-l] windows forms in .net


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



** 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

** 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: