When you make a form in VB6 or VB.NET a class is created for it. But in VB6 a global variable is also made with the same name as the form so that you can easily access it, this was removed from VB.NET to improve efficiency of the program, so multilpe form manipulation is a bit tougher in VB.NET for those people who never used the object-driven features in VB6.
Anyways back to your problem; In VB6 you can open form2 with a command-button in form1 by adding the following line of code in the click event for that command-button:
is method that all forms have by default.
The above code makes form2 a non-modal
can also be a modal
from, meaning you can't access form1
until form2 is closed or hidden, to make form2 modal, modify the code to:
For the 2nd problem, i.e. to exit from form2 using a button from form2 itself.
Type following line of code in the event for the exit button:
is keyword in VB6, by which the current form can reference itself.