function GetTopParentWin(childw:hwnd):hwnd ;
var
wwnd:hwnd;
begin
while True do
begin
wwnd := getparent(childw);
if wwnd = 0 then break;
childw := wwnd;
end;
result := childw
end;
Author
Target
Keywords
Description
Artem A. Berman
Win32
Window, Active, Foreground, Caption
Setting Window with given caption foreground.
function SetForegroundWindowEx(FCaption: string): Boolean;
begin
Result := SetForegroundWindow(FindWindow(nil, PChar(FCaption)));
end;