Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid behavior
Message
 
To
12/10/2005 14:02:07
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
01058375
Message ID:
01058382
Views:
8
This message has been marked as the solution to the initial question of the thread.
>I would like to execute a program (*.prg) when the user exits a textbox via the return key but not trigger the program if he tabs or clicks out of the textbox. Any ideas on how to do this?

What about to put this in LostFocus Event of the TextBox:
IF LASTKEY() == 13 && ENTER
   DO WhatEver
ENDIF
DODEFAULT()
or in KeyPress Event of the TextBox:
IF nKeyCode == 13 && Enter
   DO WhatEver
   NODEFAULT          && I am not sure if these two lines at the bottom is neccessary
   KEYBOARD '{TAB}'
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform