title: In C# what is the best way to close a newly opened form if there is a failure in CTOR/Load event?
body: <p>What is the best method [pattern] to close a newly opened Windows form in C#/.NET if there is a trappable error in the CTOR/_Load event ?</p>
  
  <p>i.e.,</p>
  
  <pre><code>bool loadError;
  MyForm_Load(...) {
    try {
    } catch (SomeException ex) {
      // Alert the user
      MessageBox.Show("There was a critical error.  The form will close.  Please try again.");
  
      // There was some sort of error, and I just want the form to close now.
      loadError = true;
  
      return;
    }
  }
  </code></pre>
  
  <p>Now I want to act on loadError.
  I've tired using the Activate event, but that yielded no results.  Any suggestions on what the best way to go about doing this is ?</p>
  
  <p><strong>Update:</strong>  Perhaps I should have been a little more explicit.  Doing a "this.Close();" during the forms Load event will cause an exception to be thrown as a form can't be closed and the exception will be "Cannot call Close() while doing CreateHandle()".</p>