Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HELP !! How do I avoid doing Valid ?
Message
 
 
To
01/09/2000 11:19:31
Rene Boshoff
Castledex Information Systems
Johannesburg, South Africa
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00411749
Message ID:
00411753
Views:
11
>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).
********
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform