title: overriding Form's OnFormClosing for validation
body: <p>I'm planning on overriding OnFormClosing (of System.Windows.Forms.Form) to perform validation of the user input to my dialog.  If the validation fails, then I will set the FormClosingEventArgs's Cancel property to true:</p>
  
  <pre><code>protected override void OnFormClosing(FormClosingEventArgs e)
  {
      if (DialogResult == DialogResult.OK)
      {
          if (!IsDialogInputValid())
          {
              e.Cancel = true;
              return;          // Is not calling the base class OnFormClosing okay here?
          }
      }
      base.OnFormClosing(e);
  }
  </code></pre>
  
  <p><strong>My Question:</strong> Should I be calling the base class' OnFormClosing even when I cancel the close (that is, should I remove the early return above)? </p>
  
  <p>My current thinking is that I should not call it, since delegates attached to the FormClosing event wouldn't expect to be called when the dialog itself has decided it is not closing.  On the other hand, I'm nervous that perhaps the base class' OnFormClosing does other necessary stuff.</p>
  
  <p>FYI, I'm new to Winforms, so any advice on how I <strong>should</strong> be performing validation (if this is not the best approach) is appreciated.</p>
  
  <p>Related link: 
  <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.onformclosing.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/system.windows.forms.form.onformclosing.aspx</a> </p>