Hi Brian - if you set the exitLock to TRUE, you can implement an 'on closeRequest' handler that will fire whenever you try to quit. This gives you an opportunity to present a dialog ("Are you SURE?") or otherwise clean up after yourself.
Sorry - there used to be a technote about this but it's vanished. It isn't documented in the help file (or anywhere else now the TN has disappeared). IIRC you need to return TRUE from this handler in order to continue with the 'quit'. Some force-closing may be required to figure it out...
Thank you Sean, It works as I expected.