dispswitch

dispswitch picks up the window that has focus, and moves it to the next display monitor it can find, whilst trying to roughly preserve the monitor-relative position and (if the window is sizeable) size. If you have multiple monitors, you need this program, and you need it NOW. It will save you lots of time.

It's designed for use with a hotkey program, such as AutoHotKey, so that you can do this with a single keypress.

download

dispswitch.zip (program, source code, this file)

AutoHotKey installation

The official approved AutoHotKey configuration is as follows. Add this to your AutoHotKey INI file using the 'Edit This Script' option on AutoHotKey's right-click menu.

#a::Run c:\bin\dispswitch.exe

Hold Window key and tap A to move the current window from one monitor to another.

configuration (for advanced users)

dispswitch can work out how to move the window based on the name of the program that created it. To do this, create a file called dispswitch.ini in the same place as dispswitch.exe.

dispswitch.ini is just an ordinary INI file. The name of each section is the name of an EXE file, each entry's key is a flag specifying the type of movement to perform, and each entry's value a regular expression to match against the window title. If the window title matches the regular expression, or the regular expression is blank, that flag is used.

The flags are:

DontResize
Don't resize the window after it has been moved.
TakeParent
Move the window's parent window (if any) as well.
TakeExe
Move all windows owned by a program whose EXE name is the same as the one for the current window.

A sensible example dispswitch.ini, that stops command prompt windows being resized when they are moved:

[cmd.exe]
DontResize=

(This entry is already in the dispswitch.ini supplied.)

known bugs

  • Doesn't work properly with Winamp. When using the classic skin, only the playlist window moves; when using a modern skin, nothing moves at all. To fix this, switch to foobar2000.
  • Some programs try to be too clever – though not as clever as Winamp – and can get a bit confused after dispswitch moves them. An example is Faststone Image Viewer.