Q: How can ESPL be notified when the Ensign program is closing so that information can be saved before the program closes?
A: Redirect the OnCloseQuery event for the main Ensign form to an ESPL procedure which performs the clean-up tasks such as saving information. The main Ensign form is referenced with the component named frmMain. This example will print a message in the Output window when Ensign closes.
uses Forms; procedure ShutDown; begin writeln('Exiting'); end; begin if ESPL = 3 then frmMain.OnCloseQuery := 'ShutDown'; end;