隐藏了你怎么关闭?漏一招[]:
procedure KillDosForm(Name: string);
// Name为你运行的程序的文件名
function ExtractFileMainName(const FileName: string): string;
var
p: Integer;
begin
Result := FileName;
Delete(Result, Pos('.', Result), MaxInt);
p := Pos('/', Result);
while p <> 0do
begin
Delete(Result, 1, p);
p := Pos('/', Result);
end;
end;
var
WH: THandle;
begin
WH := FindWindow(nil, PChar('已完成 - ' + ExtractFileMainName(Name)));
if WH <> 0 then
SendMessage(WH, wm_Close, 0, 0);
end;