Hab in diesem Thread
hier folgendes gefunden:
Delphi-Quellcode:
procedure CloseProcessWindows(const AProcessID: DWord);
function CloseWindowsCB(AHandle :HWND; AProcessID: DWord): LongBool; stdcall;
var
myProcessID: DWord;
begin
GetWindowThreadProcessId(AHandle, @myProcessID);
// compare process id of AHandle against AProcessID
if myProcessID=AProcessID then
PostMessage(AHandle, WM_CLOSE, 0, 0);
Result:= True;
end;
begin
EnumWindows(@CloseWindowsCB, AProcessID);
end;
weiß aber leider damit kaum was anzufangen... -> armer Anfänger