Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel button question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00166025
Message ID:
00166095
Views:
14
Steve,

Set the Cancel cmd.Cancel=.t. then in your LostFocus() test for lastkey()=27 to see if they cancelled out.

>I have a text box on a form. The text box has the focus and I have some validation code in the LostFocus of the test box.
>
>I also have a Cancel command button on the same form. When I press the Cancel button I want to RELEASE thisform. But after it does the RELEASE thisform, it runs the LostFocus on the text box which I don't want to happen. I want to just exit the form and forget the LostFocus at that point.
>
>But I need the LostFocus to be in the text box in case I don't press the Cancel button and fill out the text box with information. Lost Focus checks the text box for valid information.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform