本文整理自网络,侵删。
uses shellapi;
if Application.MessageBox(System.Pchar('关闭计算机?'), '询问', 1 + 32) = id_OK then begin ShellExecute(Handle,'open','shutdown.exe','-f -s -t 0', nil, SW_HIDE); end;
相关阅读 >>
键盘钩子,鼠标钩子,Delphi环境下编写的键盘鼠标钩子的程序示例
更多相关阅读请进入《Delphi》频道 >>