Left value of the maximized form lazarus / 31-LCL ---------------------------------------------------------------------- krzynio · 2023-11-21 12:13 Hi. Why Left parameter of maximized form is not zero but -8? Border size is zero. Tested on Windows 11 with Lazarus 2.2.6 ---------------------------------------------------------------------- Handoko · 2023-11-21 12:54 Can you provide a demo? I tested it on my Lazarus 2.2.6 Ubuntu Mate 23.10, it showed zero, this is my code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);var  i: Integer;begin  WindowState := wsMaximized;  for i := 1 to 100 do    Application.ProcessMessages;  Caption := Left.ToString;end; The for-loop is used for making some delays so the Left property can have correct value. ---------------------------------------------------------------------- krzynio · 2023-11-21 13:15 Thank you for your interest. Could you try this please? 1. start a new project 2. put a button on from and write a procedure onbuttonclick: showmessage(IntToStr(Form1.Left)) 3. Run the program and click the button. The Left should have a positive value, i.e. 861 4. Maximize the form and press the button again. Now Left is -8 ??? what I do not understand. I have to add that I work on virtual machine. Maybe this helps. ---------------------------------------------------------------------- Handoko · 2023-11-21 13:42 I could be wrong. But I believe Windows consider the form style border as part of the form position. For example you can see the thick border of the form that run on WinXP from the screenshot below, it gave me -4 px when maximized. I opened and zoomed it using GIMP, and I could clearly see the thickness of the border is 4px. ---------------------------------------------------------------------- krzynio · 2023-11-21 17:17 I think the same, probably in Windows 11 the frame is invisible but still exists. It looks strange but there is some logic in this. When window is maximized the frame is outside of the desktop and you cannot catch it for windows resizing. ---------------------------------------------------------------------- Martin_fr · 2023-11-21 20:10 I am on Windows 10 Maximizing the form, and left = -1448 => But then that is on a monitor that starts at -1440 On a normal monitor, I get -8 too That seems to go back for some time => Lazarus 1.8 has that too. ---------------------------------------------------------------------- ASerge · 2023-11-21 20:34 Quote from: krzynio on November 21, 2023, 01:13:09 pmHi. Why Left parameter of maximized form is not zero but -8? Border size is zero. Starting with Windows 8, Microsoft has added transparent shadows to the window for beauty. Unfortunately, the company did not make the appropriate changes to the Windows API, as a result, many applications had to be changed to take into account these additional boundaries.