Asso79 Posted July 3, 2003 Posted July 3, 2003 I have a problem when i press enter i want that execute tab, but not work Private Sub TextBox7_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyData = Keys.Return Then SendKeys.Send("{TAB}") End If End Sub [code] Quote
Leaders dynamic_sysop Posted July 3, 2003 Leaders Posted July 3, 2003 Private Sub TextBox7_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown shouldnt it be Handles TextBox7.KeyDown not "1" Quote
JABE Posted July 3, 2003 Posted July 3, 2003 I tried it and got it working. Just noticed though that Textbox7_KeyDown Handles Textbox1.KeyDown. Is this correct? Quote
Asso79 Posted July 3, 2003 Author Posted July 3, 2003 Excuse me: Private Sub TextBox7_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox7.KeyDown Quote
*Experts* mutant Posted July 3, 2003 *Experts* Posted July 3, 2003 Its KeyCode, not KeyData. :) Quote
rustyd Posted July 8, 2003 Posted July 8, 2003 Doesn't e.handled = True need to be there also? If e.KeyChar = Chr(Asc(vbCr)) Then SendKeys.Send("{Tab}") e.Handled = True End If Quote rustyd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.