Delphi Form State and State Size
1 answer
This is not visible within the VCL. Instead, you need to dive into the Win32 API. You need a function GetWindowPlacement
.
var
WindowPlacement: TWindowPlacement;
....
WindowPlacement.length := SizeOf(WindowPlacement);
Win32Check(GetWindowPlacement(Form.Handle, WindowPlacement));
The required information can be found in the structure WindowPlacement
. Beware that coordinates are reported relative to the stage, not the screen.
You usually need this information so you can recover it later. Use SetWindowPlacement
for this.
+6
source to share