Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quit FoxPro application
Message
From
18/02/2003 17:11:02
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00754625
Message ID:
00754685
Views:
26
>There are some errors that I consider as 'Fatal Errors' and when it happens, I want my application to display a message to the users and terminate the application after 30 seconds.
>
>This is how I did it:
>
>Close Databases All
>Close All
>Release All
>Cancel
>
>But the form that the application is at, when this message is displayed, is still being displayed.
>
>How do I close all windows and quit my application?


The proper way, the one used by commercial frameworks is to trigger a TABLEREVERT in any open forms the user might have. This would apply if your app allows users to open multiple forms and potentially be doing edits in more than one form. So, besides messaging the user (maybe by means of a MessageBox), you would revert any dirty buffers, the issue a CLEAR EVENTS, to let the normal ON SHUTDOWN and QUIT take over.

You might also want to add functionality for these errors to log them (either to a log text file/dbf or maybe to the NT Event Log). You could also add messaging by email to the admin for serious errors.

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform