procedure TForm1.FormCreate(Sender: TObject); var wplc: TWindowPlacement; begin if not AutoScroll and (WindowState = wsMaximized) then begin wplc.length := SizeOf(wplc); GetWindowPlacement(Handle, @wplc); wplc.rcNormalPosition.Right := wplc.rcNormalPosition.Left + Width; wplc.rcNormalPosition.Bottom := wplc.rcNormalPosition.Top + Height; wplc.showCmd := SW_MAXIMIZE; SetWindowPlacement(Handle, @wplc); end; end;