Textbox, pressing return

stp

Member
Joined
Mar 23, 2005
Messages
5
Programming Experience
Beginner
In my system, the return key has no effect on textboxes.

I would like it to cause to pass the focus to the next entry control in the form

Is there any way to achieve that?
thanks
 

ashu_from_india

New member
Joined
Mar 6, 2005
Messages
2
Programming Experience
1-3
u can write the code on the KeyPerss event of the textbox, or if u want this for all the textboxes then, make the KeyPreview property of the Form true and then use SendKeys.Send in the KeyPress event of the Form.

i hope it will help
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
i'd use the keycode of the keyup event (like i stated in the thread that i posted a link to in here) that way if there's a reason to code the keypress event there's no conflict or heavy work that needs to be done for the accepting a return on a textbox :p
 
Top Bottom