SetForegroundWindow
SwitchToThisWindow
procedure TApplication.BringToFront;
var
TopWindow: HWnd;
begin
if Handle <> 0 then
begin
TopWindow := GetLastActivePopup(Handle);
if (TopWindow <> 0) and (TopWindow <> Handle) and
IsWindowVisible(TopWindow) and IsWindowEnabled(TopWindow) then
SetForegroundWindow(TopWindow);
end;
end;
时间: 2024-10-15 18:21:17