Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help
Message
De
11/10/1999 13:35:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Help
Divers
Thread ID:
00274911
Message ID:
00275016
Vues:
25
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform