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!

Detect Pressing of Enter Key

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
how do i detect when the Enter Key is pressed b/c whenever it gets pressed after some string is put in the edit box i have, the hole program closes, i want to detect the Enter Key and instead change the SetFocus() to the next edit box
 
U dont. U need to disable the carriage return = exit issue. )I cant remember the setting name, but theres a property that says enter acts as tab

K
 
You need to change the OnOK() function which defaults to exit the program.

Then in the OnOK() function you can put code in to do what you want, i.e.

if edit1 has focus and appropriate text then setfocus to edit2
 
wait how can i change it, isnt the function a static function that cant be edited?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top