Board index » delphi » Win95 Shutdown, EndTask or Close?

Win95 Shutdown, EndTask or Close?

Some users pointed out to me that when they have my app minimized and
shutdown, no settings are saved!  Normally I have some code in the "Close"
event which is triggered, but when a Shutdown occurs it is not.

Is Win95 Ending Tasks when it shut's down?

How can this be overridden!?!

David W. Yutzy
OS/2 Warp'd

 

Re:Win95 Shutdown, EndTask or Close?


Quote
In article <4gstmu$...@mycogen.terminus.com>, dyu...@terminus.com (Stone) wrote:
> Some users pointed out to me that when they have my app minimized and
> shutdown, no settings are saved!  Normally I have some code in the "Close"
> event which is triggered, but when a Shutdown occurs it is not.

> Is Win95 Ending Tasks when it shut's down?

> How can this be overridden!?!

> David W. Yutzy

David-

The event you want to use is OnCloseQuery -- this is triggered when a request is
made to shut down your app, whether or not it is iconized.  When Windows (and
Win95) starts to shut down, it'll send a msg to all apps notifying them: your app
has a chance to do any final cleanup, and then reply to Windows - letting it know,
in effect, whether or not it's OK to shut down...

Jonathan R. Strong
The Strong Group

Re:Win95 Shutdown, EndTask or Close?


In article <DnEIEn....@tigger.jvnc.net>, j...@strong.com says...

Quote

>In article <4gstmu$...@mycogen.terminus.com>, dyu...@terminus.com (Stone)
wrote:
>> Some users pointed out to me that when they have my app minimized and
>> shutdown, no settings are saved!  Normally I have some code in the "Close"
>> event which is triggered, but when a Shutdown occurs it is not.

>> Is Win95 Ending Tasks when it shut's down?

>> How can this be overridden!?!

>The event you want to use is OnCloseQuery -- this is triggered when a
request is
>made to shut down your app, whether or not it is iconized.  When Windows
(and
>Win95) starts to shut down, it'll send a msg to all apps notifying them:
your app
>has a chance to do any final cleanup, and then reply to Windows - letting it
know,
>in effect, whether or not it's OK to shut down...

The above is correct.  You may have been cleaning things up in the
Form.Destroy procedure rather than the OnClose procedure.  Using Form.Destroy
will cause your problems, as I too have found out :)

Other Threads