当前位置:首页 > 开发 > C# > 正文内容

C# 获取屏幕高宽度

C#3年前 (2022-11-03)
方式1-不包含任务栏高度    
var primaryScreenHeight = SystemParameters.FullPrimaryScreenHeight;
var primaryScreenWidth = SystemParameters.FullPrimaryScreenWidth;


方式2-需要Forms    
var w = Screen.GetBounds(this).Width;
var h = Screen.GetBounds(this).Height;



转载请注明出处。

本文链接:http://pythonopen.com/?id=244

返回列表

上一篇:C# 颜色算法

下一篇:C# 捕获鼠标

相关文章

C# string与Hex互转

StrToHex    /// <summary>...

C# 可空参数

using System; using System.Runtime.Inte...

C# 缩减代码量的一些方式

static void Main() { Thread thre...

C# Winform 拖放文件

private void Form1_Load(object send...

C# Graphics图像抗锯齿

g.SmoothingMode = SmoothingMode.AntiAlia...

C# Graphics文本抗锯齿

g.TextRenderingHint = TextRenderingHint....