Multi Form App in VB.NET

woklet

Member
Joined
Mar 4, 2005
Messages
15
Programming Experience
5-10
From my main form, in a combo box, I call a second form like this:

dim NewForm as form2
NewForm = new form2
NewForm.show

After the user completes their work in form2, I need to get back to form1. How can I do this? If I do this from form2...

dim OrigForm as form1
OrigForm = form1
form1.show

...it creates another instance of form1. I need to get back to my original form1. How can I go back and forth from one form to another without re-creating them each time?

Thanks in advance
Ben
 
dim NewForm as form2
NewForm = new form2
NewForm.show

If you do not close the first form (form1) while opening form2, the form should stay there. Form2 appears on top of form1. By closing form2 (Me.Close within form2 itself) form1 should appear. If you want to invoke form1 back to the top without closing form2 you can try Me.SendToBack() in form2.

You may also refer to other similar threads in this forums:
http://vbdotnetforums.com/showthread.php?t=3002
http://vbdotnetforums.com/showthread.php?t=1887
 
Back
Top