本文整理自网络,侵删。
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获取flash文件的影片时长,原始尺寸,帧数等信息
Delphi firedac tfdconnection连接mysql数据库
winapi 字符及字符串函数(9): lstrcat - 合并字符串
更多相关阅读请进入《Delphi》频道 >>