procedure SwitchToThisWindow(hWnd:Thandle;fAltTab:boolean);stdcall;external 'User32.dll';
procedure TForm1.Button1Click(Sender: TObject);
var
h:thandle;
begin
h:=findwindow(nil,'test'); //为外部EXE标题
SwitchToThisWindow(h,true);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
h:thandle;
begin
h:=findwindow(nil,'test'); //为外部EXE标题
SwitchToThisWindow(h,true);
end;
转载于:https://www.cnblogs.com/fubin/archive/2010/06/15/1758636.html