title: vb.net: Using a Button on a Form to open another form, doesn't work
body: <p>I encounter the following scenarios when I try to use 2 forms. My workflow is as follows:</p>
  
  <p>(1) Load <code>Form1</code>.</p>
  
  <p>(2) A click on <code>button1</code> on <code>Form1</code> closes <code>Form1</code> and opens <code>Form2</code>.</p>
  
  <p><strong>Solution A: If I use the following code:</strong></p>
  
  <pre><code>Dim oForm As New Form2
  oForm.ShowDialog()
  Me.Close()
  </code></pre>
  
  <p>Then <code>Form1</code> will be under <code>Form2</code> (<code>Form1</code> still opens).</p>
  
  <p><strong>Solution B: If I use the following code:</strong></p>
  
  <pre><code>Dim oForm As New Form2
  oForm.Show()
  Me.Close()
  </code></pre>
  
  <p>Then <code>Form1</code> closes and <code>Form2</code> opens, but <code>Form1</code> is not on the top layer.</p>
  
  <p>I have looked through the solutions for this, most propose solution B, but for me, both solutions won't work the way I want. Can anybody tell me the reason? </p>