Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Press enter while in text box 2

Status
Not open for further replies.

Gimly

Programmer
Jan 5, 2003
26
ZA
Hi all,

I would do a search for this, but the search function is currenly off (undergoing maintenance).

I'm trying to write code where the user can press enter after inserting data into a textbox, and not have to click on the command button.

For example in MS Explorer where you type in the domain address and press enter, instead of clicking on Go.

I'm trying to do this in my application, on a normal interface.

If anyone can please tell me what I need to seach for in the MSDN library or how to do this, it will be greatly appreciated.

Thanx for everything
Regards,
Gimly
 
Set the command buttons default property to true and give it a shot.

Swi
 
Try using the KeyPress event on the textbox. You can do a simple check to see if the enter button has been pressed.

If KeyAscii = 13 Then
do processing
End If

Hope this helps
Adam
 
Thank you guys,

Both of these methods work wonderfully. I realy appreciate your help.

Regards
Gimly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top