来自:JamesBond_L, 时间:2004-3-21 22:41:55, ID:2514194 <br>WM_QUERYENDSESSION这个消息是关机消息<br>procedure GetState(var msg: TMessage); message WM_QUERYENDSESSION;<br><br>procedure Alarm.GetState(var msg: TMessage);<br>begin<br> if (msg.WParam and ENDSESSION_LOGOFF) <> 0 then //ENDSESSION_LOGOFF这个是关机的,你看看WIN32帮助看看重启注销的<br> // Do some thing<br>end;<br>http://www.delphibbs.com/delphibbs/dispq.asp?lid=2514175<br> <br>