繁体   English   中英

如何获得正确的屏幕分辨率?

[英]How to get correct screen resolution?

我的笔记本电脑屏幕分辨率为1920 *1080。但是以下调用给出了不同的分辨率-1280 *720。如何获得正确的屏幕分辨率? 我使用Windows 10

int height = Screen.PrimaryScreen.Bounds.Height;
int width = Screen.PrimaryScreen.Bounds.Width;

width = SystemInformation.VirtualScreen.Width;
height = SystemInformation.VirtualScreen.Height;

您的方法对于第一种方法几乎是正确的。

这是您应该如何编码的

        int height = Screen.PrimaryScreen.Bounds.Size.Height;
        int width = Screen.PrimaryScreen.Bounds.Size.Width;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM