At least on Unix systems I'd assume the answer was to write a signal handler: https://www.freepascal.org/docs-html/rtl/baseunix/fpsigaction.html
Kevin On Sun, May 19, 2019 at 1:23 PM 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? > > > > James > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal -- Kevin Lyda Galway, Ireland _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal