Получить позицию активного окна



Оформил: DeeCo

procedure TForm1.Button1Click(Sender: TObject);
 var
   hWindow: HWnd;
   r:       TRect;
 begin
   hWindow := GetForegroundWindow;
   GetWindowRect(hWindow, r);
   Memo1.Clear;
   with Memo1.Lines do
   begin
     Add('Top   : ' + IntToStr(r.Top));
     Add('Left  : ' + IntToStr(r.Left));
     Add('Bottom: ' + IntToStr(r.Bottom));
     Add('Right : ' + IntToStr(r.Right));
   end;
 end;




Похожие по теме исходники

Посторонние окна WinAPI




Copyright © 2004-2025 "Delphi Sources" by BrokenByte Software. Delphi World FAQ

Группа ВКонтакте