> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Size Matters
- URL: https://nolongerset.com/size-matters/
- Published: 2020-11-02T04:10:00.000Z
- Updated: 2026-05-08T13:07:40.000Z
- Description: Testing your program for small screens? You could change your own monitor's resolution, but that gets annoying real fast. Here's a better way.
- Author: Mike Wolfe
- Tags: AutoHotKey, #Import 2026-05-20 02:59

If you're like me, the monitor on your development machine has a much higher resolution than many (all?) of your users. It's easy to forget about users with less screen real estate when designing an interface on a massive monitor.

How do you know what your program will look like on a smaller screen? You could change your screen's resolution temporarily. But that gets annoying real fast.

My solution, once again, was to turn to [AutoHotkey](https://www.autohotkey.com/). I created a script where I could preconfigure some common screen resolutions. When I want to see what an application looks like at a lower resolution, I simply click on the application to give it the focus, then right-click on my script's icon to choose one of those preconfigured resolutions. The active window is immediately resized to the new resolution and centered on screen.

![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2020/11/image.png)

Pick a size, any size

This bit of code will add a [submenu](https://www.autohotkey.com/docs/commands/Menu.htm) to the right-click menu of your script's notification area icon. The script should be self-explanatory. To customize it, you just add or remove the "Menu, ResizeWin..." lines.

```autohotkey
#Persistent  ; Keep the script running

; Build Menu
Menu, ResizeWin, Add, 1920 x 1080, ResizeWindow
Menu, ResizeWin, Add, 1280 x 1024, ResizeWindow
Menu, ResizeWin, Add, 1366 x 768, ResizeWindow
Menu, ResizeWin, Add, 1024 x 768, ResizeWindow
Menu, ResizeWin, Add, 800 x 600, ResizeWindow
Menu, Tray, Add, Resize Window, :ResizeWin

Return  ; Prevent automatically resizing the current window when the script is launched

ResizeWindow:
StringSplit, Dims, A_ThisMenuItem, x
Msg =
if (A_ScreenWidth < Dims1)
{
    Dims1 := A_ScreenWidth
}
if (A_ScreenHeight < Dims2)
{
    Dims2 := A_ScreenHeight
}
X := (A_ScreenWidth - Dims1) / 2
Y := (A_ScreenHeight - Dims2) / 2
If (X < 0)
    X := 0
If (Y < 0)
    Y := 0
Send !{ESC}
WinRestore, A
WinMove, A, , %X%, %Y%, %Dims1%, %Dims2%
ToolTip, Window resized to %Dims1% x %Dims2%
SetTimer, RemoveToolTip, 5000 
Return 

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
Return 
```

**UPDATE (11/23/2020):** Thanks to Anders Ebro ([@TheSmileyCoder](https://twitter.com/TheSmileyCoder)) for pointing out some bugs in the original script I posted. I incorporated the fixes into the code sample. I'll try to be more careful about testing my code standalone before posting in the future ;-)

*Image by [Photoshot](https://pixabay.com/users/photoshot-1758529/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=1160552) from [Pixabay](https://pixabay.com/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=1160552)*