Board index » delphi » Prob. when Windows is shutting down

Prob. when Windows is shutting down

Hello,

when my Delphi-application is running, I cannot shut down
my Windows-system. Why does a Delphi-application not
automatically close, when Windows is shutting down ?

bye Carsten

 

Re:Prob. when Windows is shutting down


  Honestly?  Bad programming...   --  Most likely, you are doing something
when Windows is trying to shut down.  Windows sends your app. an WM_CLOSE
and your program says no...  So Windows waits (and eventually gives you the
'not responding message')  --  What does your program do?

--
Jason Wallace
SL Software
Dark...@SLSoftware.reno.nv.us
--
"We are Microsoft.  Resistance is Futile.  You will be Assimiliated."

Quote
FalticskaC wrote in message

<1998051906391300.CAA20...@ladder01.news.aol.com>...
Quote
>Hello,

>when my Delphi-application is running, I cannot shut down
>my Windows-system. Why does a Delphi-application not
>automatically close, when Windows is shutting down ?

>bye Carsten

Re:Prob. when Windows is shutting down


No help but the same problem when my app is minimized to the tray (using the
rxlib trayicon thing for that). Anyone ?

Quote
FalticskaC <faltics...@aol.com> wrote:

: Hello,

: when my Delphi-application is running, I cannot shut down
: my Windows-system. Why does a Delphi-application not
: automatically close, when Windows is shutting down ?

: bye Carsten

Re:Prob. when Windows is shutting down


Hello Jason,

I have found the problem -> the component TTrayIcon !
When this component is on the form, Windows cannot close my application.
Thanks for your reply!

bye Carsten

Re:Prob. when Windows is shutting down


Hello,

yes, TrayIcon is the problem !!!
Now, I will try another component!

bye Carsten

Re:Prob. when Windows is shutting down


In article <3561424...@news.greatbasin.net>, Jason Wallace <DarkElf@SLSo
ftware.reno.nv.us> writes

Quote
>  Honestly?  Bad programming...   --  Most likely, you are doing something
>when Windows is trying to shut down.  Windows sends your app. an WM_CLOSE
>and your program says no...  So Windows waits (and eventually gives you the
>'not responding message')  --  What does your program do?

Isn't it WM_QUERYENDSESSION?
--
Jeremy Collins
Kansai Business Systems

(return address not altered 'coz I get spammed *whatever* I do!)

Re:Prob. when Windows is shutting down


I have found the problem -> the component TTrayIcon !

Quote
>When this component is on the form, Windows cannot close my >application.

Thanks for your reply!

As someone already has pointed out: Process the WM_QUERYENDESSION correctly
in your TTrayIcon component or let your Windows live with it. The most
effecient way is just to call DefWindowProc() for all other messages that
the TrayIcon message procedure don't handle.

Other Threads