detecting and aborting the system shutdown 
Author Message
 detecting and aborting the system shutdown

Hi All,

I'd like to detect and abort the system shutdown.
Anyone know the ways?

--

Obrigado

Analista de Sistemas
TN Internet (0xx31 297-9002)
http://www.*-*-*.com/
Belo Horizonte - Minas Gerais



Tue, 18 Feb 2003 05:24:45 GMT  
 detecting and aborting the system shutdown

In the Form_QueryUnload event, you've got the Cancel parameter.  If you set
it to True, the default window proceedure will return FALSE for the
WM_QUERYENDSESSION message, thus aborting the system shutdown.  Alternately,
you can subclass your top level form yourself and return 0 for
WM_QUERYENDESSSION.  Under WinNT/2K, it is possible that some windows will
die before you can cancel the shutdown.  This is simply the way the OS
archtecture was designed and cannot be avoided (maybe it could be if you
took some extreme measures).

--
Howard Henry Schlunder
 Winamp is currently playing:
 Foo Fighters - 09 Walking After You


Quote:
> Hi All,

> I'd like to detect and abort the system shutdown.
> Anyone know the ways?

> --

> Obrigado

> Analista de Sistemas
> TN Internet (0xx31 297-9002)
> http://www.tn.com.br
> Belo Horizonte - Minas Gerais



Tue, 18 Feb 2003 13:37:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Detecting a system shutdown

2. Detecting if app is shutdown by system or user

3. Detect if app shutdown by system or user

4. Detecting system shutdown?

5. Detecting operating system shutdown...

6. Detecting operating system shutdown...

7. Detecting a Windows Shutdown

8. Detecting shutdown

9. Detecting a shutdown/reboot/logoff ?

10. Detecting Shutdown when using WaitforSingleObject function

11. Detect Shutdown

12. Detecting Windows shutdown

 

 
Powered by phpBB® Forum Software