ChangeDisplaySettings 0.0.3
dotnet tool install --global ChangeDisplaySettings --version 0.0.3
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local ChangeDisplaySettings --version 0.0.3
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ChangeDisplaySettings&version=0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package ChangeDisplaySettings --version 0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Change Display Settings
Changes display settings in Windows from Powershell or .Net tool.
Usage
Powershell
Install
Import-Module set-display-resolution.psm1
Usage:
Set-DisplayResolution(1024,768,CDSFlags.SetPrimary);
write-host Get-DisplayResolution()
.Net Tool
Install:
dotnet tool install --global ChangeDisplaySettings
Usage:
ChangeDisplaySettings -w 1024 -h 768
...
ChangeDisplaySettings --help
...
-w, --width Required. Width of the screen
-h, --height Required. Height of the screen
-t, --test (Default: false) Test resolution change or actually perform the change.
--help Display this help screen.
--version Display version information.
Resources
- https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsa
- https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.10240.0/um/WinUser.h#L12522
- https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.10240.0/um/wingdi.h#L2315
- https://devblogs.microsoft.com/scripting/use-powershell-to-interact-with-the-windows-api-part-1/
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
0.0.3 | 333 | 1/16/2023 |
0.0.3: Used more appropriate command 'ChangeDisplaySettings' instead of 'ChangeDisplayResolution', which is better suited to later improvements.
0.0.2: First release as .Net tool