How to move windows that open up offscreen?

278

135

I have a dual monitor setup, and I recently played around with the positioning settings, and some of my single window applications do the favour of preserving where they were last closed, and opening in the same position later. Unfortunately, that now places them out of the viewable area of my screens!

Is there some way to force a particular window into the viewable area?

Matthew Scharley

Posted 2009-10-10T08:41:54.220

Reputation: 4 083

2This is still a problem in windows 10! I have 3 monitors and I only use one 'here and there'... when I do, then stop using it, some open programs default to opening up on it. I have to do the win+left arrow to eventually get it back to the main monitor. – None – 2016-06-04T15:13:05.053

1Still a problem seven years later... – Jack Wasey – 2017-02-15T22:30:30.840

winlister is the best.. I tried the other tricks before, but this one works all of the time.. alt-space, etc. only works on some windows – Mikey – 2020-02-24T13:43:52.853

Answers

202

For Windows 7 and later users: Windows Key+Shift+ or will move the selected window to the monitor in that direction.

andho

Posted 2009-10-10T08:41:54.220

Reputation: 2 144

2Thanks for this, I had an app with a non-standard window so the Alt-Space technique didn't work (Foxit Reader on Windows). – Bdoserror – 2015-11-05T18:38:01.983

3Also of note is the win + left/right/up, which places the window covering half of the active monitor (on either side) or maximizes it. This should work in all conditions I've found, and are very useful keys too (except when I keep hitting them when trying to fn + arrow keys :P). – Kat – 2017-01-30T16:42:08.947

11This does nothing in my Windows 10 Pro x64 – Mike 'Pomax' Kamermans – 2017-05-25T01:00:40.247

3@Mike'Pomax'Kamermans: Funny. This is the only thing that works on my Windows 10 Pro x64 laptop to move an Emacs window that opens off-screen. – Mike Sherrill 'Cat Recall' – 2017-07-13T11:15:59.897

1I have to intuit it and find the entry on the taskbar, shift click, hit "move" and then guess whether I should press "left" or "right" for a full minute. – Mike 'Pomax' Kamermans – 2017-07-14T01:28:27.457

It's working for me on Windows 10 x64, though a bit weird. My secondary is on top of primary, but pressing win + shift + up doesn't work. Pressing win + shit + right does. In Ubuntu Gnome it works like charm. – andho – 2017-07-25T13:28:31.620

2Wow, can't believe I never knew about this. Someone still finding this useful 8 years later :) – veryRandomMe – 2017-10-04T01:58:19.437

Amazingly enough it works with only 2 monitors. The third one doesn't get windows moved to it for whatever reason. – bug-a-lot – 2018-02-27T08:39:16.777

Thank you very, very, very, very, very, very much. This works for fullscreen (hacked fullscreen windows) in windows 7 (I know .. terrible .. I should ask if I can upgrade to win 10). I really needed a way of moving fullscreen gvim and win+arrow does not work. Luckily, this works almost too well. Thanks again. – dylnmc – 2018-09-05T16:13:13.003

442

I use this approach:

  • Use Alt+Tab to switch to the off-screen application.
  • Press Alt+SPACE to bring up the system menu (you won't see it because it is off screen)
  • Press R to select the "Restore" menu choice to ensure the windows isn't maximized (you cannot move it if it is maximized)
  • Press Alt+SPACE again, then M to select the "Move" menu choice.
  • Press one of the arrow keys to initiate the movement.
  • Now just use the mouse to place the window where you want.

If you are using a non-English version of Windows, the "R" and "M" menu choices will probably be different.

Terje Mikal

Posted 2009-10-10T08:41:54.220

Reputation: 4 867

9Thanks a lot "Terje Mikal" for your solution, that saved me. But given that the problem only happens since Windows 7 removed the good old solution (Right-Click the App button on the Taskbar), there is an even better solution, posted by "kmote" on 18 Jun 2013 17:45 under "Emthigious" 10 oct 2010 08:50: « Under Windows 7 you need to SHIFT-right-click on the taskbar button » – Michel Merlin – 2016-12-10T08:25:36.810

1Tried every other step, but initiating movement with the arrow keys is what finally, actually did it... wow. And I was this close to reinstalling the application! – Philip – 2017-01-12T17:56:59.800

1With the app I'm dealing with, Restore is greyed out, but Maximize does work in that phase, and then the move is not required. Maximize for the win! – Brian Bulkowski – 2018-03-21T22:47:56.573

I do as above but the following combo also works for me, Alt + Tab, Alt +Space, M, then press Esc, this also seems to work – Mz A – 2019-02-28T06:58:25.077

1Its almost 2020, still dealing with this. – Mert – 2019-08-08T09:27:47.087

This is the only procedure that is working in Win10, since they removed the "Maximalize" option in right-click in taskbar in Win10. Keys Win+arrow didn't work either, they were moving the window somewhere above all the monitors. Thumb and vote up :-) – Oak_3260548 – 2019-08-29T12:10:56.253

I am bookmarking this. Worked beautifully. – Captain Hypertext – 2020-02-05T12:51:39.623

17

For Windows 10 in order to use the old move the window with the cursor keys trick you need to have the Shift key pressed when you open the context menu from the Task bar.

enter image description here

Info from How To Geek

Brad Patton

Posted 2009-10-10T08:41:54.220

Reputation: 9 939

5In current Windows 10 builds, you can also mouse over the task bar and hold for a second, which will cause a thumbnail view of the window to appear. Right-clicking the thumbnail gives the "old" context menu just like a shift-click. – Coderer – 2018-08-13T07:31:36.830

1@Coderer: The comment is really helpful, I didn't know that. I thought they removed it completely. – Oak_3260548 – 2019-08-29T12:12:11.797

I totally forgot about this! I think you can also shift-right-click if the taskbar button represents one window. You get a different context menu if there's more than one window for the application in question. – Coderer – 2019-08-29T12:22:41.660

13

You can right-click the program's button on the taskbar, and then click "Move". You can now use the arrow-buttons on your keyboard to move the window where you can see it. Requires some fiddling, sometimes the windows get "stuck" on the monitors edges. You can also try using the mouse, but the keyboard is a bit more reliable if you can't see the window yet ;-)

Emthigious

Posted 2009-10-10T08:41:54.220

Reputation: 343

This is the only solution that worked for me... – sebagomez – 2016-08-27T21:13:45.910

shift+right clicking the application icon in the taskbar only works if the application supports that function. Slack, for example, does not. The Alt-Space trick, however, I believe works for anything that has a maxmize/minimize button on its window – TurnipEntropy – 2019-02-22T15:11:00.403

2You should be able to use the arrow keys even if they are offscreen, unless there is something non-standard on your system that prevents this. This has always been my standard response for people experiencing this issue. – music2myear – 2011-04-22T19:13:59.323

2Didn't know about the keyboard, but you can't use the mouse if they are offscreen, I tried that already. – Matthew Scharley – 2009-10-10T08:54:01.390

10Also after pressing at least one arrow key the window is "attached" to the mouse and you can move it with your mouse (without clicking!) This one-key-plus-mouse approach is usually faster than using keys only. – Daniel Rikowski – 2013-06-04T15:52:28.743

8Under Windows 7 you need to SHIFT-right-click on the taskbar button. – kmote – 2013-06-18T17:45:05.307

9

Back before there was the task bar, I used to fix this problem with Alt+Space to bring up the window menu, then M for the Move function. The arrow keys would then allow you to move the window back on-screen.

Greg Hewgill

Posted 2009-10-10T08:41:54.220

Reputation: 5 099

1+1 with caveat that they will not move if they are maximised to a screen, this can be a problem if the windows are not simply "beyond the limits" but are on a dummy screen. They may be for the OP since maximising should have covered the whole of the resolution of the occupied screen. – mckenzm – 2018-04-03T01:30:31.790

9

Another fast way is to r-click on the task bar and select Cascade Windows.

T. Kaltnekar

Posted 2009-10-10T08:41:54.220

Reputation: 7 636

4This is a rather ugly way of doing it because it'll affect all my open windows (and I usually have atleast a browser open as well, if not half a dozen others) – Matthew Scharley – 2009-10-10T09:22:46.853

1True, it's fastest however. Also you can close the window that was off screen and use undo cascade after that which will restore positions of the windows. I don't know if it will also restore position of the window that was off screen to that position since I can't try it (only have one monitor). – T. Kaltnekar – 2009-10-10T10:22:55.967

6

I ran into this problem, and absolutely nothing worked for me. So I went into Task Manager, and right-clicked the program that was off screen. Switch to didn't work, nor did bring to front. To note, this was a static window, so maximize was unavailable via the taskbar. But you can maximize via the Task Manager, and that brings it to your main display! From there you can do whatever you need to with the window. :)

Leo

Posted 2009-10-10T08:41:54.220

Reputation: 61

Thank you for this answer. Right clicking & Maximize in Task Manager was the only thing that worked for me. – a coder – 2015-12-16T00:48:56.723

5

Edit: Discontinued as per comments

To quickly solve this problem in the future, and to position applications over the dual-screen I can recommend Winsplit Revolution. It reduces solving this problem to simply pressing Ctrl-Alt and a num-pad key to put the window back exactly where you want it.

Andy

Posted 2009-10-10T08:41:54.220

Reputation: 646

unfortunately it's not free anymore – Charbel – 2014-09-15T16:35:03.530

Yeah, it looks good but I have a strict policy of not paying unless I want to do so. Like for Lastpass or Acronis True Image. And with my schedule it is very possible that it may be more than 30 days before the problem crops up again so trial periods don't work for me. – SDsolar – 2017-05-04T19:21:03.387

1WinSplit Revolution has unfortunately been discontinued, and there are no new updates coming." replaced by "MaxTo", currently USD $19 – TT-- – 2018-10-02T13:54:56.600

1WinSplit-Revolution is freeware and is still available for download if you search for it. The last version was 11.04, released in 2011. It works in Windows 10. The modified v9.02 source is available in GitHub as WinSplit-Reloaded. It's an awesome product. – Ben – 2019-06-10T15:07:33.180

@Ben, thanks for the links. I went to the link in the answer and quoted that info from it. (Now the page reads "WinSplit Revolution is no longer available, but we offer an excellent alternative.") The readme in that GitHub fork is informative and specifically mentions "version 9.02, publicly released on 2009". – TT-- – 2019-07-11T22:06:55.667

3

I just ran into this problem with Git GUI on Windows 7, which is based on Tk and as such tends to glitch out in weird ways at times on Windows. I tried hitting Alt-Space and using the move command to shimmy it back into view, but it seemed stuck. Maximising it would bring it back, but if I put it back into windowed mode it would disappear again.

What I did was maximise it, grab the title bar, and drag it to the side of the screen so that Aero Snap sized it to half the screen size and put it into windowed mode. After that, I dragged it away from the side of the screen, and regained control of it.

unused

Posted 2009-10-10T08:41:54.220

Reputation: 31

So many answers more highly upvoted, yet not a single one worked for me. This did. – Dan Nissenbaum – 2017-02-04T17:07:34.407

Git GUI brought me here, too, but I solved it with the Shift-RightClick (on the taskbar icon), Move, arrow key, then mouse (to put the window where it should be) combination. Emthigious / Brad Patton's solution works. – mcalex – 2017-07-03T03:59:18.970

3

I use a nifty little tool called Shove-it which simply checks whether any window is outside the screen edge and shoves it back onto the screen again. It's ancient software (and the homepage proves it) but works on all Windows versions.

Torben Gundtofte-Bruun

Posted 2009-10-10T08:41:54.220

Reputation: 16 308

The installer just locks up for me (on Windows 7). – mhenry1384 – 2015-03-30T02:21:43.170

@mhenry1384 well it is 14 years old (and 32 bit), we can't really expect it to work with new (64 bit?) versions..... – Torben Gundtofte-Bruun – 2015-04-01T11:14:02.303

It installed for me (W7/64) however it doesn't bring the NVidia driver tool back to my visible monitor. None of the other solutions work either. – a coder – 2015-12-16T00:47:12.913

Link is now dead :-( – danio – 2013-09-23T10:48:39.140

:-( on the other hand, this solution may have outlived itself. Does it ever still happen? It's been years since I last had a need for this. – Torben Gundtofte-Bruun – 2013-09-27T07:51:47.893

1

In some cases, despite having multiple screens at the remote location, you may not have access to them from your location. The key commands won't work because you have been locked out of any view that is not on your screen.

In this case, if you can open additional instances of the application, do so. The first few instances will almost certainly appear in the task bar as yet more phantom windows. Keep doing this. Eventually, they will begin to populate the primary view. Then use the task bar icon to right click and close the off-screen instances. Once there are NO off-screen instances open, close the ones on the primary screen. Next time you open that application, it will appear on the primary screen and not "off camera."

Greg Mayer

Posted 2009-10-10T08:41:54.220

Reputation: 11

1What are you referring to: “remote location”, “your location”, etc…?  Why would the user be “locked out of any view that is not on your screen”? – Scott – 2016-10-22T01:26:52.583

1He means VM, Citrix, RDP etc. You are not going to be reading multi-4K on your phone. This is also the case for dummy screens. Some corporate users put an HDMI dongle in, to park mandated desktop items out of sight. Going back to 1 real screen moves them back. – mckenzm – 2018-04-03T01:35:18.070

1

For anyone familiar with PowerShell, try this:

  • Copy & paste the below code into a PowerShell ISE session.
  • Hit Run
  • Press ALT+TAB / whatever to make the off-screen window active
  • Wait a few moments (5 seconds from hitting RUN on the script)
  • The window should now appear.

If the window is a main window, it will be moved to the top left corner of the screen.

If the window is a child window of another program, its top left corner will be aligned with its parent window's top left corner.

Add-Type @"
    using System;
    using System.Runtime.InteropServices;

    // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162897(v=vs.85).aspx
    public struct RECT 
    {
        public long left;
        public long top;
        public long right;
        public long bottom;
    }

    public class User32WinApi 
    {

        // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633505(v=vs.85).aspx
        /*
            Gets the handle of the in-focus window
            NB: In some scenarios this can be NULL; so code needed to handle such an event
        */
        [DllImport("user32.dll")]
        public static extern IntPtr GetForegroundWindow();

        // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633503(v=vs.85).aspx
        /*
            top & left are always 0 (i.e. since the rectangle is relative to the window itself)
            bottom & right equal the windows hieght and width, respectively.
        */
        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);

        // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633534(v=vs.85).aspx
        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);

    }

"@
$repaint = $true 
$windowSize = New-Object RECT

"Quick; get the window you're after in focus; you have 5 seconds..."
Start-Sleep -Seconds 5 #allow 5 seconds for the user to get the window they're after in focus (e.g. using ALT+TAB / whatever)
$activeWindow = [User32WinApi]::GetForegroundWindow()
if ($activeWindow) {
    if([User32WinApi]::GetClientRect($activeWindow, [ref]$windowSize)) {
        if ([User32WinApi]::MoveWindow($activeWindow, 0, 0, $windowSize.right, $windowSize.bottom, $repaint)) {
            "Window moved successfully (hope you agree!)"
        } else {
            Write-Warning "Failed to move the active window"
        }
    } else {
        Write-Warning "Failed to get size of the active window"    
    }
} else {
    Write-Warning "No active window found"    
}

Original code here: https://gist.githubusercontent.com/JohnLBevan/1593bbb860c2d2af436a1c9414e8adfa/

JohnLBevan

Posted 2009-10-10T08:41:54.220

Reputation: 357

1

I had the same issue with winamp. The only (unsatisfactory) solution i found so far: change the screen resolution to a different one and back

Thomas

Thomas

Posted 2009-10-10T08:41:54.220

Reputation: 11

1

You could use NIRSOFT WinLister. I noticed the “Move” method is not available on Windows 7 when you are using the classic theme, and various other methods failed so I’m posting my “IF all else fails” alternative.

  1. Download the WinLister application here.

  2. Run WinLister as Administrator and select the window you wish to move back on Screen. Not running as administrator will not give the application the ability to move the windows for you.

  3. Right click and select “Center Selected Windows” and you’re done!

Screenshots here.

user199343

Posted 2009-10-10T08:41:54.220

Reputation: 11

1Great tip - this is the only solution that worked for me for MS TFS power tools as Alt-Space only opened the menu for the owning windows explorer window, not the sub-window which was off screen. – danio – 2013-09-23T10:48:21.827

1

Select the window (e.g., using Alt+Tab). Then hold Alt+F7 and move the window with the arrow keys back into view. Done.

Sometimes it is hard to know blindly where the hidden window is located (and thus how to move it towards the screen). Animations during selection of the window might be helpful. Due to my setup (I occasionally use a second screen on top of my laptop screen), windows that appear off screen are usually below. Holding Alt+F7+Up therefore brings them into view.

Georg Jung

Posted 2009-10-10T08:41:54.220

Reputation: 661

0

You can also use UltraMon (non-free, Windows, GUI) to set up a keyboard shortcut to move a window to the next or previous monitor.

enter image description here

Franck Dernoncourt

Posted 2009-10-10T08:41:54.220

Reputation: 13 518

0

From Move a window to the bottom/top monitor with a shortcut on Windows by Tymric:

I wrote an AHK script.

Usage:

Win + Alt + Arrow: Move the active window to the monitor whose direction is indicated by the arrow. Note that this may cause your window to move outside the screen if you try to go up from monitor 2 or right from monitor 3 in your setup. I'll update it in the future.

Win + Alt + Number: Move the active window to the given monitor number

#Persistent

SysGet, MonitorCount, MonitorCount


#!Up::
  GoSub CalculateDisplacement
  WinMove, A, , %xPos%, %displaceYneg%
  return
#!Down::
  GoSub CalculateDisplacement
  WinMove, A, , %xPos%, %displaceYpos%
  return
#!Left::
  GoSub CalculateDisplacement
  WinMove, A, , %displaceXneg%, %yPos%
  return
#!Right::
  GoSub CalculateDisplacement
  WinMove, A, , %displaceXpos%, %yPos%
  return

#!1::
  GoSub CalculateDisplacement
  WinMove, A, , %xPosOn1%, %yPosOn1%
  return

#!2::
  if (MonitorCount > 1) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn2%, %yPosOn2%
  }
  return

#!3::
  if (MonitorCount > 2) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn3%, %yPosOn3%
  }
  return

#!4::
  if (MonitorCount > 3) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn4%, %yPosOn4%
  }
  return

#!5::
  if (MonitorCount > 4) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn5%, %yPosOn5%
  }
  return

#!6::
  if (MonitorCount > 5) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn6%, %yPosOn6%
  }
  return

#!7::
  if (MonitorCount > 6) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn7%, %yPosOn7%
  }
  return

#!8::
  if (MonitorCount > 7) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn8%, %yPosOn8%
  }
  return

#!9::
  if (MonitorCount > 8) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn9%, %yPosOn9%
  }
  return


CalculateDisplacement:
  WinGetPos, xPos, yPos, , , A
  Loop, %MonitorCount% {
    SysGet, MonitorDimension, Monitor, %A_Index%
    if (xPos > MonitorDimensionLeft and xPos < MonitorDimensionRight and yPos < MonitorDimensionBottom and yPos > MonitorDimensionTop) {
      currentMonitor = %A_Index%
    }
  }
  SysGet, thisMonitor, Monitor, %currentMonitor%
  displaceXpos := xPos + thisMonitorRight - thisMonitorLeft
  displaceYpos := yPos + thisMonitorTop - thisMonitorBottom
  displaceXneg := xPos - thisMonitorRight + thisMonitorLeft
  displaceYneg := yPos - thisMonitorTop + thisMonitorBottom
  Loop, %MonitorCount% {
    SysGet, nextMonitor, Monitor, %A_Index%
    xPosOn%A_Index% := xPos - thisMonitorLeft + nextMonitorLeft
    yPosOn%A_Index% := yPos - thisMonitorTop + nextMonitorTop
  }
  return

Franck Dernoncourt

Posted 2009-10-10T08:41:54.220

Reputation: 13 518

0

I've written a tool called Borderline that will automatically move off-screen windows back on-screen when run. You have to run it when you need it (works best if you assign it a keyboard shortcut or put it in the start menu), but that also means it's not always running in the background.

jamesdlin

Posted 2009-10-10T08:41:54.220

Reputation: 1 973

0

Sometimes, this solved:

  • Click WinKey + P
  • Choose to Extend or another option, and all windows will be cascaded. Move the desired window to primary screen.

T.Todua

Posted 2009-10-10T08:41:54.220

Reputation: 2 436

0

put cursor on task bar..right click select show window side by side..it will bring the window on screen..and finally bring again cursor on task bar right click select undo show window side by side..

ravi21

Posted 2009-10-10T08:41:54.220

Reputation: 1

-1

How to move windows that open up offscreen?

Temporary lower the screen resolution, grab the top bar with the mouse and move the the center. Wait for the system to automatically restore the resolution.

  1. DeskTop -> Screen resolution
  2. Select your monitor, change to some lower resolution from the current setting.
  3. System shows the new resolution, asks if you want to keep or revert in 30 seconds.
  4. Within 30 seconds, grab the miss located window and move it to the center.
  5. Wait for the time out to automatically revert.

Window moved...

Russ

Posted 2009-10-10T08:41:54.220

Reputation: 1