title: How to close first form?
body: <p>I have 2 forms in my project. Users cannot exit from the first from, frmOptometry. I have this implemented this way: </p>
  
  <pre><code>  Private Sub frmOptometry_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
      MessageBox.Show("You can only close the application from the receipt screen!")
      e.Cancel = True
  End Sub
  </code></pre>
  
  <p>The second form, frmReceipt can be exited from. I have it implemented this way: </p>
  
  <pre><code>    Private Sub frmReceipt_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
      If MessageBox.Show("Are you sure you want to quit?",
                         "Obi-Wan Optometry Closing",
                         MessageBoxButtons.YesNo,
                         MessageBoxIcon.Exclamation) =
                     DialogResult.No Then
          e.Cancel = True
      Else
          frmOptometry.Close()
      End If
  End Sub
  </code></pre>
  
  <p>Right now, it does not close the program completely because it goes to the frmOptometry_FormClosing and prevents it. What should I do to fix this? Is there anyway to figure out where the user is trying to shut down the program and then decide from there? </p>