How do I get a window back on the screen when it moved far, far away? Windows 7 (and 8) edition


Some time ago, I showed how to get a window back on the screen when it moved far, far away. That technique still works in Windows 7 and 8, but there's an easier shortcut that takes advantage of window arrangement features added in Windows 7.

First, you switch to the application by whatever means. Then hit Win+UpArrow to maximize the window. That should put the window on-screen, albeit at the wrong size. Now you just grab the title bar of the window with the mouse and drag it off the top edge of the screen. Bingo, the window returns to its original position, and you can use the mouse to put it wherever you like.

This trick doesn't work for windows that cannot be resized (such as Calculator), but for those windows, you can use the old version of the trick.

Comments (30)
  1. Entegy says:

    Would Win+Shift+left/right arrow work to get non-resizable windows back? I haven't encountered this issue in a long time and the move command (thankfully) does not allow you to move a program off the screen and keep it there.

  2. Brian G. says:

    I've always been curious why it's necessary to press an arrow key to enter move mode. Once I've pressed M to declare my intent to move the window, it seems odd that I can then move the cursor arround with the mouse and it's the four-pointed move arrow, but the window isn't anchored to it.

    Is it because I declared my intent to move with the keyboard, so it wants everything to stay keyboard-centric? Perhaps there's some usability or programmatic side-effect-prevention reason that I'm overlooking.

  3. Programmerman says:

    The linked article has a comment with a remark about discussing the technical reason "Pin" from the jump menu can't be combined with the system menu. Did that ever get discussed? I can't find it searching. blogs.msdn.com/…/9601136.aspx

    [Short version: It would be a layering violation. What if Explorer is not running? -Raymond]
  4. SimonRev says:

    Perhaps I am missing something, but Win+Up Arrow does nothing for me in Windows 7.

  5. Raphael says:

    @SimonRev

    You may have snapping disabled. On an English Windows, type "snap" in the start menu and the appropriate control panel will come up.

  6. Entegy says:

    He might also have already maximized the window or has a window that cannot be maximized.

  7. laonianren says:

    While playing with this I just noticed a cheshire cat bug in Windows 7.  If you use ALT+SPACE M LEFT to move a window off the left side of the screen it leaves its shadow behind at the edge of the screen.  The window isn't constrained to the desktop; if you use the arrows to move it up or down the rogue shadow remains stationary.

  8. Rich Shealer says:

    @Raphael – Thanks for that SNAP mouse settings panel.  I hate the way Windows now resizes my window when I move near the border.  I was just too lazy to find the magic to turn it off.

  9. Evan says:

    @Brian G: "I've always been curious why it's necessary to press an arrow key to enter move mode. … Is it because I declared my intent to move with the keyboard, so it wants everything to stay keyboard-centric?"

    The same thing happens if you right click on a window on the taskbar and choose move from there. (Depending on your Windows 7 settings you may have to hover over the taskbar entry, wait until you get the window thumbnails, then right click on one of those.) So it's not a "you started to do this with the keyboard" thing.

    I don't know the positive answer, however. :-)

  10. Joshua says:

    [Short version: It would be a layering violation. What if Explorer is not running? -Raymond]

    Then you can't get to the pin menu in the first place. Do I have to write a custom shell just to prove a point (GetSystemMenu works just fine cross-process).

    @Brian G. That's an excellent example of -100 points. If you are using the mouse, then why are you selecting the menu to move the window? The title bar move works so well.

    [Sorry I was in a hurry and didn't read the full comment context. The issue is that the system menu is owned by the app, so you can't insert your own menu items there or the app will freak out. On the other hand, you can't clone the menu because apps expect any changes to be reflected immediately, such as modifications that occur during WM_INITPOPUPMENU – something very common in practice. -Raymond]
  11. Evan says:

    @Joshua: "That's an excellent example of -100 points. If you are using the mouse, then why are you selecting the menu to move the window? The title bar move works so well."

    Not if you can't see the title bar because the window is off screen, which is what this post and the previous linked post are about.

  12. Shaun says:

    I've started to just right click on the task bar and select "Cascade Windows" – seems to work for all the problems I've run into since I realized it was an option.

  13. wendy says:

    for an orphaned window I've always used selecting the vindow from the task-bar then using the windows key with left or right arrow. works for me. But finding-out that this was what I needed to do was not easy…

  14. spike says:

    i have had the problem with tools windows popping up on the other monitor (my tv, usually off, or not displaying the pc), the old trick wouldn't work, and the new trick wouldn't work either since they are tool windows, they won't maximize.

    Other multimon unaware programs like mumble, that occasionally start on the wrong monitor, or pop up something on the monitor, i have had good luck accessing the system move menu from the win7 taskbar popup view of the window, even if it only displays a titlebar because it cant find the window content!

  15. Tragen says:

    Or you can use SheepDog ( sheepdog.codeplex.com/…/18974 ).

    It moves every off screen window back on the screen with a single hotkey.

  16. @Tragen says:

    There are probably bazillions of tools out there that provide similar functionality. However, this blog entry is about getting a window back on the screen using the system provided tools.

  17. Tragen says:

    But there are not many open source tools available. And the system provided tools

    only work for very specific situations.

  18. Jack B Nimble says:

    Why does Windows allow a window to be completely outside of the visible workspace area?

    [You'd be surprise how many applications intentionally put stuff outside the visible workspace area. -Raymond]
  19. Joshua says:

    [You'd be surprise how many applications intentionally put stuff outside the visible workspace area. -Raymond]

    Like mine, although I only do it with child windows.

  20. Tragen says:

    @Joshua

    Mine. If you have a VB6 application with modal windows, you can minimize the window, but it doesn't minimize all other windows. If you do it manually, then you cannot restore the window anymore. If you hide them you get other problems. So what else can you to then to move it to -32000 pixels?

  21. [ Why does Windows allow a window to be completely outside of the visible workspace area? ]

    Just an example: IIRC VB.NET w/ Windows Forms does not give you a simple way to create an invisible form (i.e. a form that is invisible from the start), so often people give it a default location way offscreen to hide it as soon as possible. Granted, there's a way to achieve the desired result without this trick, but it's far from obvious (stackoverflow.com/…/how-to-have-an-invisible-start-up-form).

  22. Danny says:

    "How do I get a window back on the screen when it moved far, far away? Windows 7 (and 8) edition".

    Windows 8? What a flop. I'll stick to my 7 waiting for Blue. I skipped Vista this way too, another flop. I like to jump 2 stairs at the time :).

  23. Neil says:

    Another approach for top-level windows:

    1. Start Task Manager. (Elevate it if the window you want to find is elevated.)
    2. On the Applications tab, choose the desired application.

    3. Switch to another tab, then back to the Applications tab.

    4. Choose your desired option from the Window menu.

    I don't know why Task Manager doesn't like tiling just the one application.

  24. I didn't even know there were Winkey shortcuts for Window management. The more you know.

    @Danny thank goodness you posted your opinion on Windows 8 on this only tangentially related blog post. It was touch and go there for a bit- we almost had to go without knowing your feelings on it.

  25. SimonRev says:

    Odd that the Win+Up Arrow hot key would be tied to the snap feature (which I do have disabled, BTW)  That seems like it would be of general use as well.

  26. David Lowndes says:

    How do you get a modeless dialog back on screen using the keyboard (since Alt+F6 no longer works)?

  27. John says:

    The Windows Snap Feature (specifically the keyboard shortcuts) is Windows 7's #2 killer feature in my book. #1 is the ability to reorder Taskbar Items, it enables my OCD tendencies.

    I'm surprised no one linked Raymond's older post on how to emulate the feature in previous versions of Windows, although like he mentions there's no super cool keyboard shortcut (which makes the whole deal work in my opinion). blogs.msdn.com/…/9850416.aspx

  28. Milos says:

    "#1 is the ability to reorder Taskbar Items, it enables my OCD tendencies."

    Mine too, although I wish they had gone further and given us the ability to reorder items in a group as well, so I didn't have to use a third party program for it.

  29. John says:

    @Milos Its on the list blogs.msdn.com/…/10017567.aspx :D

  30. Milos says:

    @John: Thankfully at least *someone* was able to put in the time to implement it, although I would of course have preferred it to be included in the OS itself.

Comments are closed.