Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox.valid, escape, queryunload
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00604475
Message ID:
00604497
Views:
29
This message has been marked as the solution to the initial question of the thread.
>I want the form to close. My problem is that I also want the form to close when the user clicks on the X box, without running the textbox.valid, or at least have some way for the textbox.valid to know that the reason it fired is because the user clicks the X box, then it could just RETURN .T. and not validate.

Then in the Valid of your control class, you need to test for ThisForm.ReleaseType. If it is 1 the Close box was clicked.

See ReleaseType in VFP Help for more info.

Don't you want the Valid to run unless the user Cancel's? I do not consider anything canceled unless the user explicitly clicks the Cancel button on the form. This is just the way I do it.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform