>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