title: Detecting Enter keypress on VB.NET
body: <p>I am using .NET 3.5 framework of VB.NET 2008.</p>
  
  <p>I have some textboxes in my form. I want the tab-like behavior when my user presses ENTER on one of my textboxes. I used the following code:</p>
  
  <pre><code>Private Sub txtDiscount_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtDiscount.KeyPress
      If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
          SendKeys.Send("{TAB}")
          e.Handled = True
      End If
  End Sub
  </code></pre>
  
  <p>But it doesn't work for me.</p>
  
  <p>What is the solution?</p>