在C#中获取当前屏幕的分辨率的方法
发布日期:2021-05-13 22:03:47 浏览次数:17 分类:精选文章

本文共 1171 字,大约阅读时间需要 3 分钟。

���������������������������������������C#������������������������������������������������������������������������������������������������������������������������������������������������

������������������Rectangle���

using System.Drawing;
Rectangle rec = Screen.GetWorkingArea(this);
int SH = rec.Height;
int SW = rec.Width;

������������������������System.Drawing.Rectangle������������������Screen.GetWorkingArea���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

������������������Screen.PrimaryScreen.Bounds

using System.Windows.Forms;
int SH = Screen.PrimaryScreen.Bounds.Height;
int SW = Screen.PrimaryScreen.Bounds.Width;

���������������������������System.Windows.Forms.Screen.PrimaryScreen.Bounds���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������������

上一篇:C#中创建Android项目
下一篇:C#线程暂停和继续操作

发表评论

最新留言

不错!
[***.144.177.141]2025年05月02日 13时38分44秒