Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Resolution Changer [CMD]


  • Please log in to reply
2 replies to this topic
BoBo
  • Guests
  • Last active:
  • Joined: --

Resolution Changer - allows you to change your desktop width, height, color depth, and refresh rate temporarily or permanently (via command line switches). You can have Resolution Changer run another application in a specific display resolution and return to the previous resolution when the application finishes. The command lines switches let you alter only certain dimensions and choose the best refresh rate (or a specific one).

A help screen is displayed when reschange.exe is run without any switches.

Basic Commands
If you have an application that requires certain display settings (e.g., many children's programs require 640x480x256 colors), you can modify that program's shortcut to something like this:

reschange.exe -width=640 -height=480 -depth=8 -refresh=72 "c:\Program Files\Hasbro\Freddi.exe"


This shortcut will change to VGA resolution, run freddi.exe, and then restore the original display settings when freddi.exe stops running. If you don't specify a program, it will just change the settings for you (and not restore them).

The "8" represents an 8-bit color depth or 256 colors. "4" is 16 colors; "16" for 16-bit; "24" for 24-bit; "32" for 32-bit.

This example opens a spreadsheet:

reschange.exe -width=800 -height=600 cmd /c "c:\Documents and Settings\Susan\Desktop\Club.xls"

If you don't specify a parameter, the program uses the current setting for that value. To select the maximum color depth or refresh rate, specify "max" for the switch’s value.

Multi-monitor Support :D
If your computer has multiple monitors, there are a couple of switches you can use to control each monitor individually.

The -listmonitors switch will display the “friendly” name of the monitor (e.g., “Dell 2001FP (Digital)”) as well as a more specific device name (e.g., “\\.\DISPLAY1”). You can use the friendly name as long as it’s unique among your monitors, but if your monitors are all the same model, you will need to use the device name. The switch will also add the word “primary” to indicate the display you’ve specified as your main display.

The -monitor="NAME" switch indicates which monitor to apply the resolution to. For example:

reschange.exe -monitor="Dell 2001FP (Digital)" -width=1024 -height=768

reschange.exe -monitor="\\.\DISPLAY1" -width=1024 -height=768

If the monitor name isn’t recognized, it will use the primary monitor.

Please note that this switch cannot be used to control where the application appears—that’s something only the application can decide.

Warning
Normally, Resolution Changer will prevent you from using a mode that is not supported by your video card and monitor. You can use the -force switch to use an unsupported video mode. Please be aware that you can damage your video card or monitor by using an unsupported mode. 12noon assumes no responsibility or liability for your use of Resolution Changer.

There is also a console edition (reschangecon.exe) that you can use from a batch file or script.

[More...]



not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
Res (similar util, but LGPL license and tiny)

Res is a little windows command line utility to report the current screen resolution and refresh and optionally change it to something else. If you attempt to change it to the current mode it does nothing, so it can be used in your startup folder. The source code is included in the download and is covered under the LGPL license.

The parameters for the command are:
Nothing
Displays the current screen mode(s).
-x
Set the horizontal resolution in pixels
-y
Set the vertical resolution in pixels
-bpp
Set the number of bits per pixels, valid values are 4, 8, 15, 16, 24 or 32 depending on your video card.
-refresh
Set the refresh rate in Hz. This is dependant on what your video card and monitor support, do check in the display settings first.
-device
This optional parameter sets the device to set. To get the device index first list the devices by running Res with no parameters. If not supplied the primary display will be changed.

The output on my machine looks like this:
Memecode Res v1.00

Current Desktop Resolution: 1280 x 1024 @ 32 bits per pixel, refresh=60hz.

Device[0] is 'NVIDIA Quadro FX 1000' (\\.\DISPLAY1)
Attached monitor is 'Plug and Play Monitor' (\\.\DISPLAY1\Monitor0)
Current mode: 1280 x 1024 @ 32 bit per pixel, refresh 60 hz.
Device[1] is 'NetMeeting driver' (\\.\DISPLAYV1)
Device[2] is 'RDPDD Chained DD' (\\.\DISPLAYV2)

Usage: res -x -y -bpp -refresh [-device ]

Example: res -x 1280 -y 1024 -bpp 32 -refresh 75



JoeSchmoe as Guest
  • Guests
  • Last active:
  • Joined: --
Screen resolution can also be changed directly in AutoHotkey:
http://www.autohotke... ... on&start=0

Final code by AHK god SKAN, possibly with help from Shimanov:
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1280) , (Hei:=1024) , (Hz:=60) )

ChangeDisplaySettings( cD, sW, sH, rR ) {
  VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
  DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
  NumPut(cD,dM,104),  NumPut(sW,dM,108),  NumPut(sH,dM,112),  NumPut(rR,dM,120)
  Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}