Reset or calibrate maximized window location and size?


  1. Posts : 4
    Win 10
       #1

    Reset or calibrate maximized window location and size?


    I'm using AutoHotKey to move windows on my desktop and the script gets the desktop size and coordinates from 'Program Manager'. When I get that info for a maximized window, it shows the window location as -8, -8 and the window size as 1936, 1216. My display resolution is set at 1920 x 1200, and I would expect a maximized window to have a location at 0, 0. Is there any way to reset the maximized window location to 0, 0 and size to 1920 x 1200? I looked in the monitor menu (the one that displays by pressing the buttons on the monitor itself) but could not find anything relevant there. Thanks for any help. Win 10, 20H2.
      My Computer


  2. Posts : 113
    Windows 10 Enterprise (x64)
       #2

    woodhouse said:
    I'm using AutoHotKey to move windows on my desktop and the script gets the desktop size and coordinates from 'Program Manager'. When I get that info for a maximized window, it shows the window location as -8, -8 and the window size as 1936, 1216. My display resolution is set at 1920 x 1200, and I would expect a maximized window to have a location at 0, 0. Is there any way to reset the maximized window location to 0, 0 and size to 1920 x 1200? I looked in the monitor menu (the one that displays by pressing the buttons on the monitor itself) but could not find anything relevant there. Thanks for any help. Win 10, 20H2.
    You could try MaxMax. There is a link that works at the bottom of that page.

      My Computer


  3. Posts : 4
    Win 10
    Thread Starter
       #3

    Thanks, but this suggestion will not work. My window management problem is more complex than just having maximum windows that are too large.

    Any other ideas to troubleshoot or fix the underlying problem are appreciated.
      My Computer


  4. Posts : 1,255
    Windows 10 Pro
       #4

    The numbers you are seeing are correct. This is not a fault.
    The window location and size are this way to hide the borders of a maximized window. This has been documented since the introduction of the NT platform in 1993. All versions of Windows work like this. The exact numbers are system dependent.
      My Computer


  5. Posts : 4
    Win 10
    Thread Starter
       #5

    Thanks for the reply. When you say the numbers are correct, I take it that you mean that the graphics output deliberately makes the uppermost-left pixel at -8, -8 to hide the borders. So the borders should not be visible at -8, -8, but hidden. But on my system they are visible. Is there any way to change this so they are hidden as intended?

    If the exact numbers are system dependent, is there any way to set those numbers? If not, what are they dependent on? Are they hard-coded into my graphics card or something?

    Feel free to link to the documentation you mention so I can educate myself on it. I would still like to solve this problem. I assume that not all people whose have a window at 0, 0 see a border around the left side. Thanks.
      My Computer


  6. Posts : 1,255
    Windows 10 Pro
       #6

    The Window origin of -8, -8 is determined by the border width which is determined by the theme you are using. This places the borders outside of the visible portion of the screen. If the origin was 0, 0 you would definitely see borders if they were present
      My Computer


  7. Posts : 4
    Win 10
    Thread Starter
       #7

    I originally noticed this problem because I was using AHK to put windows at 0, 0 and 1920, 0, but it was still showing portions of the desktop background. If the -8, -8 coordinates were based on the theme's border settings, then I would expect a window placed by AHK at position 0, 0 to appear flush with the monitor edge. But in fact, a window put at 0, 0 shows the desktop background on the left side.

    Reset or calibrate maximized window location and size?-clipboard-image.jpg

    Is this something that I can fix by setting the theme's border? It seems that doing so would require editing the registry.
      My Computer


  8. Posts : 1,255
    Windows 10 Pro
       #8

    The coordinates of -8, -8 are relevant only to maximized windows. A window placed at 0, 0 and set to screen dimensions is not a maximized window and will show borders. A maximized windows has a specific windows style typically set when the windows is created or shown. This is WS_MAXIMIZED in official documentation. I don't know how this would be set with Auto Hot Key.

    As to showing the desktop background when the window origin is 0, 0: This would appear to be some issue with Auto Hot Key. I have never seen or heard of this. I know little of this program.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:31.
Find Us




Windows 10 Forums