Как закрыть внешнюю программу?
Написал Ярослав Гасов   
13.05.2009

Share this!

Например, Блокнот можно закрыть так:

 

procedure TForm1.Button1Click(Sender: TObject);
var
  phandle : HWND;
begin
  phandle := FindWindow('Notepad', nil);
  if phandle = 0 then
     RaiseLastWin32Error;
  SendMessage(phandle, WM_CLOSE, 0, 0);
end;