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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catching enter key in textbox

Status
Not open for further replies.

monkle

Programmer
Feb 11, 2004
132
US
I have been trying to familiarize myself with VB.Net 2003, and I've come up with a question about the textbox control that I haven't seen addressed anyplace.

When a user is typing in a textbox, and they press the enter key, I want to be able to run a chunk of code. I'm familiar with handling this in VB6, using the OnKey events, but I haven't found anything that addresses this scenario in vb.net. If anyone can point me in the right direction, it would be greatly appreciated.
 
Nevermind, I just needed to familiarize myself with the development environment more thoroughly. I'm sorry for the post
 
for anyone looking for this...
in the KeyDown Event of the control
Code:
        If e.KeyCode = Keys.Enter Then
            'Do what you want..
        End If


________________________________________________________
Zameer Abdulla
Help to find Missing people
All cats love fish but fear to wet their paws..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top