Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 6, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using Enter To Tab Forward Through User Entry Fields

When users are comfortable using the Enter key to proceed to the next field, you can allow them to continue their old habits. You need very little coding to accomplish this. Set the KeyPreview property of the form to True, and include the following code:
 Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
	' To trick the system to think 
	' the Tab key was pressed
	If KeyCode = 13 Then SendKeys "{TAB}"
End Sub

Sub Form_KeyPress (KeyAscii As Integer)
	' To eliminate the annoying beep
	If KeyAscii = 13 Then KeyAscii = 0
End Sub
Gordy Blackwell
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date