width="84%">关闭外部应用程序
如何在 Delphi 应用程序中,
去关闭外部已开启的应用程序?
下面给出一段在 Delphi 中关闭“计算器”程序为例:
var
HWndCalculator : HWnd;
begin
// find the exist calculator window
HWndCalculator := Winprocs.FindWindow(nil, '计算器'); // close the exist Calculator
if HWndCalculator <> 0 then
SendMessage(HWndCalculator, WM_CLOSE, 0, 0);
end;
