title: Keypress warning - use the new keyword if hiding was intended
body: <p>I keep getting the following error message at <code>void KeyPress(object sender, KeyPressEventArgs e)</code>:</p>
  
  <blockquote>
    <p>Warning 'SpeedyRent.Form2.KeyPress(object,
    System.Windows.Forms.KeyPressEventArgs)' hides inherited member
    'System.Windows.Forms.Control.KeyPress'. Use the new keyword if hiding
    was intended. </p>
  </blockquote>
  
  <p>This is my code so far:</p>
  
  <pre><code>void KeyPress(object sender, KeyPressEventArgs e)
  {
      if (!char.IsControl(e.KeyChar) &amp;&amp; !char.IsDigit(e.KeyChar))
      {
          e.Handled = true;
      }
  }
  </code></pre>
  
  <p>with the following 3 references:</p>
  
  <pre><code>this.totalTxt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.KeyPress);
  this.remainTxt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.KeyPress);
  this.paidTxt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.KeyPress);
  </code></pre>
  
  <p>What is causing it?</p>