[Lazarus] Window Position

Michael Van Canneyt michael at freepascal.org
Fri Sep 22 09:42:40 CEST 2023

On Fri, 22 Sep 2023, Timothy Groves via lazarus wrote:

> Whenever a program I have written opens a created form, that form always 
> appears precisely where it sat at design time, even if that would be way 
> off the screen (my workstation has a 3440x1440 display, but the laptop I 
> run many programs on has only 1280x800).  Typically, I have to encode 
> something in FormCreate to force it to move, which is no better really.  
> Why won't the window manager just place it where it feels it should be, 
> as it does with every other program out there?  I've tried changing 
> form.Position in the Object Inspector to poDefault, or poDefaultSizeOnly 
> and that made no difference, and if I set it to poDefaultPosOnly, it 
> turns off AutoSize, and *still* makes no difference.  Is there any way 
> to disable this behaviour?

What's wrong with using poScreenCenter or poDesktopCenter ?


More information about the lazarus mailing list