title: How to raise a validation event from a key press
body: <p>I want to raise the:</p>
  
  <pre><code>private void txtbox_startdate_Validating(object sender, System.ComponentModel.CancelEventArgs e)
      {}
  </code></pre>
  
  <p>Function from a key leave event.  The leave event looks like:</p>
  
  <pre><code>private void txtbox_startdate_Leave(object sender, EventArgs e)
      {}
  </code></pre>
  
  <p>The trouble is of course if I try and call it in this manner:</p>
  
  <pre><code>txtbox_startdate_Validating(sender, e)
  </code></pre>
  
  <p>An error is raised because in this case <code>e</code> is an <code>EventArg</code>s whereas the validation function wants a <code>System.ComponentModel.CancelEventArgs</code> and so, how do I convert <code>EventArgs</code> to a <code>System.ComponentModel.CancelEventArgs</code> or create one so that I can call my validation function?</p>