>>Hi Bruce,
>>I am missing the point, 'cause I don't know what TLs are!
>>Quit may smoothen closing, and I have no quarrel with QUITting to get an application to appear to end more smoothly. My only misgiving is that by using QUIT, we may mask other issues. (This is a guess, I admit.) As we get more experience with the issues involved in ending a VFP session, we can improve the code that shuts things down and quit will be superflous. Currently if someone shuts down NT, or Ends Task, my company's code handles this smoothly. However, I'm sure there are issues I'll discover in the future that aren't being address correctly. If I use QUIT, maybe I'll never know... and that's not all bad.
>
>Oh - TL is top-level. TLs do not respect ON SHUTDOWN, but adding an
>
>ON SHUTDOWN QUIT
>
>to the main prg will actually fire in cases of abrupt termination, when the CLEAR EVENTS is never hit. In my testing, I found it was a good addition, and at the least would not hurt anything, and at the best, may "smoothen" the shutdown process. One could go further with the idea, as Ed has suggested...
To confure things more, I just have ON SHUTDOWN CLEAR EVENTS. This way all manners of closing the app run through the same shutdown code. In my experience, ON SHUTDOWN QUIT, or just QUIT wihtout CLEARing EVENTS causes "Cannot quit Visual Foxpro".
Erik Moore
Clientelligence