首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何使用命令提示符或powershell在windows 10中获得屏幕分辨率

如何使用命令提示符或powershell在windows 10中获得屏幕分辨率
EN

Server Fault用户
提问于 2017-01-10 16:28:50
回答 2查看 30.6K关注 0票数 1

我一直想逃跑

代码语言:javascript
运行
复制
wmic path Win32_VideoController get VideoModeDescription

它给我1920年x 1080,这是很好的。我改变分辨率来测试它,它仍然返回相同的东西。

有人知道为什么吗?

我的第一个屏幕设置为1360x768

第二个屏幕设置为1600 x 900。

EN

回答 2

Server Fault用户

回答已采纳

发布于 2017-01-10 19:22:34

我在powershell中找到了一种方法。

代码语言:javascript
运行
复制
"Background {0}x{1}" -f [System.Windows.Forms.SystemInformation]::PrimaryMonitorSize.Width,[System.Windows.Forms.SystemInformation]::PrimaryMonitorSize.Height
票数 3
EN

Server Fault用户

发布于 2017-01-10 17:18:18

如在https://stackoverflow.com/questions/7967699/get-screen-resolution-using-wmi-powershell-in-windows-7上所述

代码语言:javascript
运行
复制
PS> Add-Type -AssemblyName System.Windows.Forms
PS> [System.Windows.Forms.Screen]::AllScreens


BitsPerPixel : 32
Bounds       : {X=0,Y=0,Width=1280,Height=800}
DeviceName   : \\.\DISPLAY1
Primary      : True
WorkingArea  : {X=0,Y=0,Width=1280,Height=770}

BitsPerPixel : 32
Bounds       : {X=1280,Y=0,Width=1920,Height=1200}
DeviceName   : \\.\DISPLAY2
Primary      : False
WorkingArea  : {X=1280,Y=0,Width=1920,Height=1170}
票数 4
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/825360

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档