Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TForm.WindowState (https://www.delphipraxis.net/29477-tform-windowstate.html)

Bulvaye 9. Sep 2004 15:20


TForm.WindowState
 
Hallo zusammen! :wink:

Ich habe da eine Frage und zwar:

Wie kann man eigentlich bei TForm-Objekten, die sich im WindowState=wsMaximized befinden, ermitteln, wie die Fensterkoordinaten/-dimensionen im WindowState=wsNormal lauten?

chris 10. Sep 2004 02:15

Re: TForm.WindowState
 
hi,

indem du sie z.b. vor dem maximieren in einer globalen var speicherst

Bulvaye 10. Sep 2004 10:17

Re: TForm.WindowState
 
Ich hab's und es geht wie folgt: :thumb:

Die entsprechenden Informationen kann man über die API-Funktion GetWindowPlacement() abfragen. In dem zurückgelieferten Record findet sich unter rcNormalPosition das BoundsRect, das das Fensters im Status fsNormal umgibt.

Delphi-Quellcode:
var wp: TWindowPlacement;
begin
  wp.length := SizeOf (wp);
  GetWindowPlacement (Handle, @wp);
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:16 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz