How to close the system in system tray when the computer shutting down?

  • Thread starter Thread starter Sidney
  • Start date Start date
S

Sidney

Dear,
I am writting a system which opened at the system tray. But every before
I shut down my computer,
I have to close the system first. However, it should be automatically
close when I shutting down my system.
So, I want to know how I can do so that it can close up itself when the
computer shut down.

Thank You!!
Sidney
 
Hello Sidney,

Handle WinAPI WM_QUERYENDSESSION message in you app

S> Dear,
S> I am writting a system which opened at the system tray. But every
S> before
S> I shut down my computer,
S> I have to close the system first. However, it should be
S> automatically
S> close when I shutting down my system.
S> So, I want to know how I can do so that it can close up itself
S> when the
S> computer shut down.
S> Thank You!!
S> Sidney
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
May I know more about the WinAPI WM_QUERYENDESSION ?

It's exposed as an event on the Microosft.Win32.SystemEvents class.
Just handle that.


Mattias
 
Back
Top