title: compact framework 2.0 detecting enter key in a textbox
body: <p>I am developing a small app for a Motorola 9090-G using .net compact framework 2.0.</p>
  
  <p>My problem is that I can't seem to detect an enter keypress in a textbox. How do you detect an enter keypress in a textbox?</p>
  
  <p>None of the 3 detection methods seems to work. Interestingly, it DOES work in the ppc emulator. It does not work on my actual hardware however.</p>
  
  <pre><code>private void tbxQTY_KeyDown(object sender, KeyEventArgs e)
  {    
    if (e.KeyCode == Keys.Return || e.KeyCode == Keys.Enter || e.KeyCode == Keys.Decimal)
    {
      QTYEntered();
      e.Handled = true;
    }
  
    if (e.KeyData == Keys.Enter || e.KeyData == Keys.Return)
    { do something }
  
  
    if (e.KeyValue == (char)13)
    { QTYEntered(); MessageBox.Show("test"); e.Handled = true; }
  }
  </code></pre>