3

Very often, I move a window out of the way in order to see more of another window. I noticed that when I do this, I often move the window down. By doing this, part of that window is now visible, and part is invisible (beyond the edge of the screen).

I would like a piece of software that will resize a window once it reached the edge of the screen, so the entire window is always visible.

Ideally, I could specify to which edges this functionality would apply (not a requirement, though).

Ideally, but also not a requirement, I could specify to which applications this functionality would apply (I would select my text editor as this first application!).

What gratis Windows software has this functionality?

0

3 Answers 3

2

AutoHotKey

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks.

Below is an AutoHotKey script to automatically resize a window whenever it crosses an edge.

  • You could specify which edges it works on by commenting out the unneeded blocks (3 lines) under the corresponding edge label. Lines can be commented out by preceding them with semicolons
  • Please note that this script only works on the primary monitor. A multi-monitor configuration would result in a more complex implementation so I didn't do it, but I'm willing to extend the script if you need it to work on more than one screen.
  • It currently works on the active window. It's possible to add an inclusion or exclusion list that contains parts of window titles. I'll update the answer when that part is ready

    #Persistent
    #NoEnv
    SendMode Input
    
    SysGet, Mon1, MonitorWorkArea
    
    SetTimer, checkWindow, 100
    
    checkWindow:
        WinGetPos, WinX, WinY, WinWidth, WinHeight, A
    
        ;; Left
        if (WinX < Mon1Left) {
            WinMove, A, , Mon1Left, WinY, WinWidth + WinX, WinHeight
        }
        ;; Right
        else if (WinX + WinWidth > Mon1Right) {
            WinMove, A, , WinX, WinY, Mon1Right - WinX, WinHeight
        }
        ;; Top
        if (WinY < Mon1Top) {
            WinMove, A, , WinX, Mon1Top, WinWidth, WinHeight + WinY
        }
        ;; Bottom
        else if (WinY + WinHeight > Mon1Bottom) {
            WinMove, A, , WinX, WinY, WinWidth, Mon1Bottom - WinY
        }
    return
    
1

Another alternative to automagically resizing windows could be to use windows organizer programs, which allow to snap windows into different areas of the screen.

Three alternatives to get you started looking for such programs:

  • Basic Windows - Try Win+Left and Win+right, or drag the window until cursor hits any of the four sides of the monitor
  • MaxTo - Which allows you to define areas on the screen (on multiple monitors) where you can snap windows (rather cheap 19 USD)
  • AquaSnap - Which is more of dragging and grouping tool, but is free and looks nice
0

It is built in to Windows. If you simply grab, (click and hold), the top edge of the window, rather than the title bar, then drag down the window will resize downwards rather than move, (you can tell when you have the correct point to click, assuming that you have the default cursors set, by your cursor changing to a vertical double headed arrow ⇕).

1
  • 2
    Thanks Steve. I would like to be able to move the window, but once it's bottom border reaches the bottom of the screen, I want the window to start resizing instead of moving. Commented Jun 29, 2015 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.