All my experience is in VB5/6 and I am now learning VB.Net. I have a
sophmoric question about proper use of forms.

In VB5/6 I designed a form and to use it from a menu item I simply did
the following

myForm.show vbModal
unload myForm

In the form, my exit button would simply do the following

unload me


What would the equivalent code look like in .Net? Do I still need to
do an unload or will it unload when the menu subroutine ends due to
scoping? How should my form terminate and return to the menu
sub-routine? etc.

TIA
John

Re: Newbie: Using forms VB vs VB.Net by MajorTom

MajorTom
Sun Jan 23 13:33:48 CST 2005

this is for C# but is the same logic for VB.NET

> myForm.show vbModal
> unload myForm

Form myForm = new Form();
myForm.Show();
or
myForm.ShowDialog();
// for modal or no modal

> In the form, my exit button would simply do the following
>
> unload me

this.Close();

MajorTom

"J L" <john@marymonte.com> wrote in message
news:qhi7v0l96cekj90mjh0iergv7echc610bj@4ax.com...
> All my experience is in VB5/6 and I am now learning VB.Net. I have a
> sophmoric question about proper use of forms.
>
> In VB5/6 I designed a form and to use it from a menu item I simply did
> the following
>
> myForm.show vbModal
> unload myForm
>
> In the form, my exit button would simply do the following
>
> unload me
>
>
> What would the equivalent code look like in .Net? Do I still need to
> do an unload or will it unload when the menu subroutine ends due to
> scoping? How should my form terminate and return to the menu
> sub-routine? etc.
>
> TIA
> John