Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bypass Validation when a Cancel button is pressed.
Message
 
To
11/11/1999 16:27:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00288499
Message ID:
00290537
Views:
25
Todd,

As a long-time member of the KISS club, I like to keep it that way. While playing around with your last suggestion, I discovered that using the 'X' and Close title bar option is the same as pressing CTRL-W. That really let me keep this simple. Thanks for all your help.


>>Remember me? Gosh this thread has gone a long way. Your suggestion worked great concerning checking for Lastkey() in the Valid method when the 'cancel' command button was pressed. Now, how can I stop the validations from executing when the user exits the form by pressing Close from the title bar menu (I've got the form set as closable) or clicking on the 'x' in the upper right hand corner of the form.
>>
>>Thanks,
>
>I don't have a well formulated answer for you on this one... but maybe I can point you in the right direction. Start by creating a property on your form called something like letmeout. So you can change your if statement to: if lastkey() = 27 or thisform.letmeout = .t. then
>
>Then find out which event fires first if someone clicks the X or hits close on the form. At that point, set thisform.letmeout = .t.
>
>In the forms init method, set thisform.letmeout = .f.
>
>Does that give you a good start?
Michael Helms

May the Schwartz be with you.<(©¿©)> -- Mel Brooks
"Someday, and that day may never come, you will be called upon to perform a service" -- Vito Corleone
"Live like there is no tomorrow, Dance like no one is watching, Love like you've never been hurt." -- Anonymous
"I'm thinking about joining the campaign for shorter tag lines." -- Me
Previous
Reply
Map
View

Click here to load this message in the networking platform