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

Sven Barth pascaldragon at googlemail.com
Sun May 19 19:14:31 CEST 2019


James Richters <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.

Regards,
Sven

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


More information about the fpc-pascal mailing list