title: How to properly close form1 after showing form2
body: <p>I have a script editor that I'm using to code through the object model of software my company uses. It has a login form to make sure that you are able to access the system and a main form to pull the script from the object and edit using ScintillaNET. </p>
  
  <p>The issue that I am having is when I pass the object to the main form and leave the login form open it runs smoothly but I want to close the login form after the main form is open. When I do this it stops immediately after opening the main form. </p>
  
  <p>Here is a sample of my code. You can see for now that I have commented out the line Me.Close() as that seems to the issue.</p>
  
  <pre><code>' Close this form, show the main form and pass the M3 object to it
     Dim f As FormMain = New FormMain
    ' Pass the M3 object to next form
     f.M3System = M3System
     f.Show()
    'Me.Close()
  </code></pre>
  
  <p>any help would be awesome!!!</p>