title: Capturing Enter Key press on windows form not working
body: <p>I have a user authentication form with username and password textboxes.There is an <code>okay</code> button that fires the code to validate the credentials.
  I want the same code to get executed when the user hits <code>Enter</code> key anywhere on the form.
  So i register for the keypress event like this</p>
  
  <pre><code> this.KeyPress += UserLogin_KeyPress;
   private void UserLogin_KeyPress(object sender, KeyPressEventArgs e)
          {
               if (e.KeyChar == (char)13)
                  {
                  MessageBox.Show("enter");
                  }
  
          }
  </code></pre>
  
  <p>This event is not triggered at all.What i'm i doing wrong?</p>