|
-
Dec 6th, 2002, 02:12 AM
#1
Thread Starter
Junior Member
Keypress
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,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|