ChangeDisplaySettings Code
Status: Beta
Brought to you by:
jens-olaf
ChangeDisplaySettings Readme (probably ReadMe first unless you already know what you're doing :^) ChangeDisplaySettings is a tool for running applications in a multiple monitor environment. The problem: Windows starts DirectX fullscreen applications by default on the primary monitor. If you like to play your games on the secondary monitor and your specific game doesn't support display selection, you're out of luck. Well until now. The solution: By using ChangeDisplaySettings, DirectX fullscreen applications can be started on any screen. Examples: ChangeDisplaySettings.exe --display 2 --primary --restore --execute "d:\games\Overlord\Overlord.exe" -- display n: n is the number of the display as seen in the Windows control panel -- primary: make display n the primary display -- restore: Upon quit, restore any settings back to it's previous values -- execute: Launch the corrssponding shell object along with all parameters. With some fullscreen applications, it's possible to keep working on a different monitor, for instance with Media Portal (if properly configured). In most other cases it is recommented to blank any unused display and hide the taskbar. This blocks anyone from sitting down at your desk and trying to interfer with your serious entertainment. ChangeDisplaySettings.exe --display 2 --primary --blank -- hideTaskbar --restore --execute "d:\games\Overlord\Overlord.exe" --blank: Blank out displays as approriate in order to hide any screen flicker while changign the primary display. --hideTaskbar: Hides the Windows task bat If you're using Microsoft Media Center to lauch your games, you might want to add the --mce option in order to restore Media Center after the application has quit. ChangeDisplaySettings.exe --mce --execute "d:\games\Overlord\Overlord.exe" If you actually want to know what display are actually available, type ChangeDisplaySettings.exe --list Just list display n ChangeDisplaySettings.exe --list --display n List all, including virtual displays ChangeDisplaySettings.exe --list --all Displays the full list of options. ChangeDisplaySettings.exe --help Install To use ChangeDisplaySettings.exe from the console, copy it to any folder in your path. Anyhow, Ive put it in d:\Games\Resources\bin\ since I'm using it for games exclusively. What flavour of ChangeDisplaySettings.exe should I use? You should use the x64 version if you have Windows XP 64 or Vista x64, and the x86 version otherwise. Normally you should use the Win32 version, unless you are using ChangeDisplaySettings.exe in batch files. In this case the Console version is the better choice because the batch file is continued only after ChangeDisplaySettings.exe is finished. The console version always opens a console window, regardless whether text is put out or not. The Win32 version displays any errors by popping up a dialog whereas the console version writes the message to the console and exits with the error code. If you start the Win32 version from a command prompt, ChangeDisplaySettings connects to the console window, but any text is out of sync with the command prompt console output as Win32 applications are run out of sync. -------------------------------------------------------- Coypright 2008-2009 by Jens-Olaf Hemprich Published under the Gnu Public License