Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HELP !! How do I avoid doing Valid ?
Message
 
À
01/09/2000 11:19:31
Rene Boshoff
Castledex Information Systems
Johannesburg, Afrique du Sud
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00411749
Message ID:
00411753
Vues:
10
>How can I avoid this ? Is there maybe a way that I can test if the "Cancel" button has been clicked so that I can use an IF statement in my Valid event to only execute if "Cancel" has NOT been selected ? I've tried to set a flag in the click event of the Cancel command button but that doesn't work !

Here is a solution from Jim Booth:

*******
1) Set the Cancel property of the Cancel button to .T.
2) At the beginning of every Valid event put this code;

IF LASTKEY() = 27
RETURN .T.
ENDIF

The cancel property makes clicking the cancel button the same as pressing Escape. This has the added feature of making pressing Escape the same as clikcing the cancle button (that is the cancel button's click evnet will fire when pressing esacpe).
********
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform