[fpc-pascal] Detecting console close with red X on windows

James Richters james at productionautomation.net
Sun May 19 21:47:37 CEST 2019

Thanks for clarifying,  I have everything working well now in my real program,   I didn’t need to do anything other than save and close some files, so I have plenty of time to get everything done.




From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Sven Barth via fpc-pascal
Sent: Sunday, May 19, 2019 1:15 PM
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Cc: Sven Barth <pascaldragon at googlemail.com>
Subject: Re: [fpc-pascal] Detecting console close with red X on windows


James Richters <james at productionautomation.net <mailto:james at productionautomation.net> > schrieb am So., 19. Mai 2019, 19:10:

Thanks!    That was quite helpful!   I have a test program kind of working.  

I notice I only  get 5 seconds to do what I am going to before it closes, and I also notice that my program can no longer respond to keystrokes after I hit the red X.    How do other programs get around this?  For example if I open word for windows and type something and hit the X it asks if I want to save it and will wait indefinitely  for a response.   Is this a limitation because I am running console application,    Is there a way I can do this with my console application as well


Correct, that is a limitation of the console no matter the operating system. 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190519/d0b9418a/attachment.html>

More information about the fpc-pascal mailing list