title: How to skip Validating after clicking on a Form's Cancel button
body: <p>I use C#.
  I have a Windows Form with an edit box and a Cancel button. The edit box has code in validating event. The code is executed every time the edit box loses focus. When I click on the Cancel button I just want to close the form. I don't want any validation for the edit box to be executed. How can this be accomplished?</p>
  
  <p>Here is an important detail: if the validation fails, then </p>
  
  <pre><code>            e.Cancel = true;
  </code></pre>
  
  <p>prevents from leaving the control. </p>
  
  <p>But when a user clicks Cancel button, then the form should be closed no matter what. how can this be implemented?</p>