Winform获取屏幕分辨率

代码

点击查看代码
   int xWidth3 = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
   int yHeight3 = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
   string ResolutionRatio = xWidth3.ToString() + "*" + yHeight3.ToString();

Windows 屏幕缩放与布局
125% 对应分辨率 宽 高 ,除以1.25
例如:1920*1080 屏幕缩放与布局为 125% 则屏幕分辨率为 1536 * 864

posted on 2024-02-27 15:08  RookieBoy666  阅读(20)  评论(0编辑  收藏  举报