On Sun, 19 May 2019, 13:23 James Richters, <ja...@productionautomation.net> wrote:
> Is there a way I can detect that a user has pushed the red X in the upper > right corner to close the console window in a free pascal console > application so I can save some files before the program terminates? > You can do that with SetConsoleCtrlHandler() and catching CTRL_CLOSE_EVENT in the handler. Henry
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal