Board index » delphi » Prevent the ShutDown of Win95 or NT

Prevent the ShutDown of Win95 or NT

How can I prevent the ShutDown of Win95 or NT while my Delphi-Program is
running ?

Thanks for a tip

Willi Khnis
wkueh...@bluewin.ch

 

Re:Prevent the ShutDown of Win95 or NT


In article <6mnsoa$7f...@bw107zhb.bluewin.ch>, Willi Khnis
<wkueh...@bluewin.ch> writes

Quote
>How can I prevent the ShutDown of Win95 or NT while my Delphi-Program is
>running ?

>Thanks for a tip

Create a message handler in your main form to trap the
WM_QUERYENDSESSION message. If you want to prevent shutdown,
the simplest way is to not call the inherited handler.

HTH
--
Jeremy Collins
Kansai Business Systems

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

Re:Prevent the ShutDown of Win95 or NT


Quote
>>How can I prevent the ShutDown of Win95 or NT while my Delphi-Program is
>>running ?

My advice is :- Don't do it !!!

This won't stop users switching off the PC with the power switch and will only
serve to irritate them.

 Just make certain that when windows closes down your program handles the
shut-down gracefully.

Graham Plain

Other Threads