Newbie: Using forms VB vs VB.Net

  • Thread starter Thread starter J L
  • Start date Start date
J

J L

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top