Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help
Message
From
11/10/1999 13:35:17
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Help
Miscellaneous
Thread ID:
00274911
Message ID:
00275016
Views:
26
>Hi,
>
>I have a problem, which is when i have a form open i can click on to the 'X' button of the form in the top right hand corner. the problem is when the form closes the valid event of the textbox i am on is run. is there any way i can stop the valid and lostfocus events from running when the 'X' button is clicked or even when a command button is clicked?
>

Why?

If you need to do this, I suspect you are using the valid event wrong.

If what you need to is to validate input except when the user click the escape button, then you can have your validation code look like:

IF LASTKEY() <> 27
* validation code here
ENDIF

Just make sure that the Cancel property of your escape or cancel button is .T., and VFP automagically sets LASTKEY() to the escape code when it is clicked.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform