In my VB.NET Form, I have TextBox1, TextBox2, TextBox3, ComboBox1 and TextBox4 consecutively. I set the Form KeyPreview to True and put this code.

Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
If e.KeyChar = Chr(13) Then
SendKeys.Send(vbTab)
End If
End Sub

On every Textbox, every time I press Enter the focus goes to the next control. But when the focus is in the ComboBox1 and I press Enter, the focus is still on the ComboBox1.

Do you have any solution to this problem?


Thanks,