ResolutionChanger is a simple WPF application for changing the display resolution of your monitors. It utilizes Windows API functions to enumerate display devices and settings, allowing users to select and apply different resolutions to their displays.
- Enumerates and lists all connected display devices.
- Retrieves and displays all available resolutions for each display.
- Allows users to change the resolution of a selected display.
- Saves the selected resolution as the default setting for the display.
- Launch the Application: Open the
ResolutionChanger
application. - Select a Display: Choose the display you want to change the resolution for from the
DisplaysComboBox
. - Select a Resolution: Pick the desired resolution from the
ResolutionsComboBox
. - Apply Changes: Click the
Save
button to apply the selected resolution to the display.
The application uses several WinAPI functions to interact with display settings:
ChangeDisplaySettingsEx:
Changes the settings of the specified display device to the specified graphics mode.EnumDisplaySettings:
Retrieves information about one of the graphics modes for a display device.EnumDisplayDevices:
Obtains information about the display devices in the current session.
The application defines several structures and enumerations to hold display settings information:
DISPLAY_DEVICE:
Contains information about the display device.DEVMODE:
Contains information about the initialization and environment of a printer or a display device.DisplayDeviceStateFlags:
Flags that define the state of a display device.
- Initialization: The main window initializes and loads displays and their resolutions.
- Button Click: Handles the event when the user clicks the Save button to change the display resolution.
- Load Displays: Enumerates and populates the DisplaysComboBox with connected display devices.
- Load Resolutions: Enumerates and populates the ResolutionsComboBox with available resolutions for the selected display.
- GetDisplayDevices: Helper function to list all connected display devices.
- .NET 8.0
- Windows OS
- Clone the repository:
git clone https://github.com/XeinTDM/ResolutionChanger.git
- Open the solution in Visual Studio.
- Build and run the project.
Feel free to use, modify, and distribute the code as you wish.