I have dual monitors and I want to span my current window so that it appears as one giant window on both monitors. Does anyone know how to do this natively in Windows?


14 Answers 14


In contrast with what others are saying, here is a free, working solution that maximises the window which is under the mouse.

(Credits go to the guy who wrote these amazing 'autoit' functions - I just wrote the bit which uses them.)

Download autoit and install it (free software):


Create a .au3 file.

Paste this inside:

#include <misc.au3>
#include <Array.au3>
HotKeySet('{ESC}', '_Exit')

Global $WinText, $OldMouse[2], $NewMouse[2], $Windows, $x, $MyWin, $MyCoords

$NewMouse = MouseGetPos()
$title = _GetWin()

Func _GetWin()
    Local $Coords
    $Mouse = MouseGetPos()
    $OldMouse = $Mouse
    $Windows = _WinList()
    ;_ArrayDisplay($Windows, "")
    For $x = 1 To UBound($Windows)-1
        $Coords = WinGetPos($Windows[$x][0], "")
        If $Coords = -4 Then ExitLoop
        If IsArray($Coords) Then
            If $Mouse[0] >= $Coords[0] And $Mouse[0] <= ($Coords[0]+$Coords[2]) And $Mouse[1] >= $Coords[1] And $Mouse[1] <= ($Coords[1]+$Coords[3]) Then ExitLoop
    If $x = UBound($Windows) Then $x -= 1
    $MyWin =  $Windows[$x][0]
    $Control = _MouseGetCtrlInfo()
    $Return = $Windows[$x][0] & @CRLF & $Control 
    Return $Return

Func _WinList()
    Local $WinListArray[1][2]
    $var = WinList()
    For $i = 1 to $var[0][0]
        If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then
            Redim $WinListArray[UBound($WinListArray) + 1][2]
            $WinListArray[UBound($WinListArray)-1][0] = $var[$i][0]
            $WinListArray[UBound($WinListArray)-1][1] = $var[$i][1]
    Return $WinListArray

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
    Return 0

Func _Exit()

Func _MouseGetCtrlInfo()  ; get ID, Classe and Text of a control
    Global $hWin = WinGetHandle($MyWin)
    Global $sClassList = WinGetClassList($hWin)
    Local $sSplitClass = StringSplit(StringTrimRight($sClassList, 1), @LF)
    Local $aMPos = MouseGetPos()
    ;_ArrayDisplay($sSplitClass, "")
    $MyCoords = ClientToScreen($hWin)
    For $iCount = UBound($sSplitClass) - 1 To 1 Step - 1
        Local $nCount = 0
        If $sSplitClass[$iCount] = "WorkerW" Then ContinueLoop
        While 1
            $nCount += 1
            $aCPos = ControlGetPos($hWin, '', $sSplitClass[$iCount] & $nCount)
            If @error Then ExitLoop
            $hCtrlWnd = ControlGetHandle ($hWin, "", $sSplitClass[$iCount] & $nCount)
            If IsArray($aCPos) Then
                If $aMPos[0] >= ($MyCoords[0]+$aCPos[0]) And $aMPos[0] <= ($MyCoords[0]+$aCPos[0] + $aCPos[2]) _
                    And $aMPos[1] >= ($MyCoords[1]+$aCPos[1]) And $aMPos[1] <= ($MyCoords[1]+$aCPos[1] + $aCPos[3]) Then
                    $aReturn = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $hCtrlWnd)
                    If @error Then Return "Err"
                    $Text = ControlGetText($hWin, '', $sSplitClass[$iCount] & $nCount)
                    If StringInStr($Text, @LF) Then $Text = "demasiado largo"
                    If IsArray($aReturn) Then Return 'ControlID: ' & $aReturn[0] & @CRLF & 'ClassNameNN: ' & $sSplitClass[$iCount] & $nCount &  @CRLF & "Text: " & $Text
    ;_ArrayDisplay($sSplitClass, "")
    Return "No Ctrl"

Func ClientToScreen($hWnd)    ; get client area of a win relative to the screan
    Local $Point, $aRes[2]
    Local $cX, $cY
    $Point = DllStructCreate("int;int")
    DllStructSetData($Point, 1, $cX)
    DllStructSetData($Point, 1, $cY)
    DllCall("User32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($Point))
    $aRes[0] = DllStructGetData($Point, 1)
    $aRes[1] = DllStructGetData($Point, 2)
    Return $aRes

Then change the line


to the values of your liking.

Then you can create a windows shortcut to this file, right click it->properties, and assign a shortcut (e.g. CTRL+ALT+UP).

Most likely you will find that you will need to repeat the procedure and create a second file to restore the window to a small size.

Hope this helps

  • 1
    Love it! I was going to use the NVidia mosaic, but the monitors I wanted to split across where from two separate graphics cards, and couldn't recable because of KVM not doing VGA. Only gotchya - I wasn't able to get the keyboard shortcut to work directly off a shortcut to the .au3 file. I was able to get a keyboard shortcut to work off a shortcut to a batch script that called the au3 script though. – paquetp Nov 29 '13 at 19:59
  • 1
    Indeed the shortcut method does not work, unless the script file is placed on your desktop. – nikos Dec 1 '13 at 11:39
  • 1
    For those having more than 2 monitors, the 0,0 in the line WinMove($MyWin,"",0,0,3840,1165) represents the coordinates of the starting point, so one may maximise across any amount of screens by changing these numbers accordingly. – ilakast Jul 28 '14 at 13:00
  • I have to create a shortcut to this maximize.au3 in Win 10, and the properties of the shortcut let me assign a key-shortcut; not batch needed. – Martin Zaske Jun 7 '18 at 8:30
  • @nikos this script works for me but I cannot figure out the syntax for the windows position; seems my 0,0 is somewhere "near" the top left of my main monitor but not quite. Also my second monitor is to the left of my main monitor (and the script seems to allow for such, but I do not yet read AutoIt syntax). But the script is opening my program to the right of my main monitor (where there is "nothing"). I tried hooking to a negative value (-1920,0) but that did not work, negative numbers refused. Please advise. Your answer is a joy, will be my solution for many programs, just need to learn more – Martin Zaske Jun 7 '18 at 8:34

Jeff Axelrod has a great solution that uses AutoHotKey.

He maps the ShiftWindows combination to maximize a window across all displays, which compliments Windows 7's Windows hotkey, which maximizes the selected window in one monitor.

Here is his code (thanks Jeff!):

;Shift + Windows + Up (maximize a window across all displays) https://stackoverflow.com/a/9830200/470749
    WinGetActiveTitle, Title
    WinRestore, %Title%
   SysGet, X1, 76
   SysGet, Y1, 77
   SysGet, Width, 78
   SysGet, Height, 79
   WinMove, %Title%,, X1, Y1, Width, Height
  • Shift + Windows + Up does not work on my Windows 10 setup with two screens and two different graphics drivers. Still potentially useful to others. – Martin Zaske Jun 7 '18 at 8:11
  • Works fine on Windows 10 with a single graphics card. I could not get this to work with a Citrix window though. It opened the window over 2 monitors fine, but then when I clicked into the window, Citrix took control and resized the window back to one monitor. – Fordy Oct 2 '20 at 9:05

Use Dual Monitor Tools: it's a set of free tools do manage multiple screens setup.

In the Swap screen tool you can assign a hotkey to the "Supersize active window" so you can maximize it to occupy all the screens.

  • 2
    Excellent program with sane defaults (all disabled) that does exactly what I was looking for, coming from Ultramon. A hint: the hotkey to "Supersize active window" acts like a toggle. Hitting it again restores the window. – Fanis Hatzidakis Sep 5 '17 at 14:52
  • 1
    Does not work with VNC Viewer from RealVNC. The Dual Monitor Tools hotkey correctly maximizes the VNC Viewer window across both monitors, but when I select the "Full screen mode" option in VNC Viewer to remove the window frame the window pops back to only occupy a single monitor. – Axel Bregnsbo Mar 13 '20 at 9:19
  • Does not work with Citrix. It fills 2 monitors, but then when I select full screen mode it goes back to a single monitor. – Fordy Oct 2 '20 at 9:23

If you have an nVidia video card:

  1. Right-click on the desktop, and click "NVIDIA Control Panel"
  2. At the bottom of the list of tasks, under Workstation, is "Set up Mosaic". Click it.
  3. In the right pane, click the checkbox next to "Enable Mosaic"
  4. Under Displays, put checkmarks next to the monitors you want to combine.
  5. Under Configuration, select what topology you want (side-by-side, vertical..)
  6. At the bottom-right of the screen, click "Apply"

Now, when you click the Maximize button, it'll cover both monitors. Your taskbar will also cover both monitors. If that bugs you, try dragging it to the left of the monitor so it becomes vertical (this works better if you make the icons small and use 'never combine').

  • "Set up Mosaic" no longer available in NVIDIA Control Panel 8.1.940.0 from 2020. – Axel Bregnsbo Mar 13 '20 at 9:11
  • @AxelBregnsbo I am using that version (8.1.940.0) and still see the option, even though this is a different computer than the one I used before. Maybe it depends on the particular card or driver (this one is a Quadro K1100M with driver version 425.53). The feature doesn't seem to actually work for me anymore, though... – michaelmoo Apr 15 '20 at 4:19
  • you need quadro or nvs – eyaler Nov 20 '20 at 1:47

A bit late but if using Intel integrated graphics you can open the Intel graphics control panel, select display menu and from there choose multiple displays and choose "Collage" this will let you choose which monitors you would like to extend across along with some other choices.

Here's a screenshot of it enabled:

Heres a screenshot of it enabled


I use a free utility to do so, VirtualScreenMaximizer:


You can customize the shortcuts to use for maximizing and restoring, and it will expand the window over the taskbar when maximizing.


I found a way to do this without any software or code. It isn't automatic or perfect, but is easy and works well enough.

  1. Windows + left or right arrow key to snap the window to half a monitor on the far edge of the two monitors
  2. Grab the edge of the window and drag it across both monitors to the far side

Click and drag, otherwise you can use your advanced graphics card to configure the monitors to act as one large screen.


On my Windows 7 I'm able to drag the window so that it covers both screens. If you right click your desktop and chose "screen resolution", you have to chose "extend these displays" under "multiple displays". If you close the window again it should remember size and position.

  • That's true, I'm looking for a solution where you can easily maximize the window to both monitors with either a shortcut or something like that. – Crackerjack Sep 9 '10 at 16:57
  • aren't you able to do that by simply dragging the window title-bar to the to the top of the screen – subanki Sep 9 '10 at 17:05
  • @subanki - no, that'll just maximize the window on the current monitor (the one you "bumped") – Chris_K Sep 9 '10 at 20:06

If anyone is still trying to do this using autoit I managed do this using this code:

HotKeySet("^+{UP}", "Resize_Window") ; CTRL+SHIFT+UP
While 1
Func Resize_Window()
  • After including WinAPI.au3 and WindowsConstants.au3 this works. – Max Hohenegger Feb 23 '16 at 10:38

I use this workaround with Sizer (homepage) - its small freeware utility allows you to set predefined windows size by right-click in Window stretch area.

Just create profile set:

  • Width = sum of monitors widths
  • Height = Monitor height - taskbar height (= 40)
  • Move to = Top left.

Then just right click to right-bottom end of the Window and select the profile.

enter image description here


UPDATE: Turns out this is from something called nView Desktop Manager from NVidia. Available for Quadro and NVS products on Windows 7 to 10. "https://www.nvidia.com/en-us/drivers/nview/149_77/nview-win7-win10-x64-149-77-driver/". Original answer below.

While researching this, (to figure out how I did it by accident a few times), I figured out an answer. Hold "shift" key when you click the maximize button if you have Windows 10. For me, it maximizes across all 3 of my monitors, all of which are different sizes, different connections (vga,dvi,dvi to display port adapter), and 1 of them is on a KVM switch. The height is set to the smallest of the 3 monitors so things line up across all. I assume it would work as expected for same size monitors.

Note: I don't know if this is a recent feature or been around a while. Haven't found anything about it online.

  • This does not work on any of my Windows 10 machines. I suspect this works due to third-party software you have installed. – Ramhound Feb 11 '20 at 19:19
  • Yup, looks like it is something called nView Desktop Manager from NVidia. Available for Quadro and NVS products on Windows 7 to 10. nvidia.com/en-us/drivers/nview/149_77/… – stymie2 Feb 12 '20 at 20:45
  • Ramhound, thank you, good point. – stymie2 Feb 14 '20 at 15:25

Right click on toolbar of windows, select Restore, then resize it on both screens.


i was able to get F11-maximized windows over 3 unified displays using NVidia Mosaic with a Quadro GPU. I was NOT able to do it using autoit / autohotkey / dual monitor tools / virtualscreenmaximizer / intel collage. With these you can get a maximal size window but not a gui-less maximized window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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