本文整理自网络,侵删。
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 webbrowser getelementbyid().innerhtml与getelementbyid().value的区别
winapi 字符及字符串函数(12): lstrlen - 串长度
更多相关阅读请进入《Delphi》频道 >>