Console.WriteLine("主显示器完整尺寸:"); Console.WriteLine("宽:" + Screen.PrimaryScreen.Bounds.Width); Console.WriteLine("高:" + Screen.PrimaryScreen.Bounds.Height);Console.WriteLine("主显示器工作尺寸(排除任务栏、工具栏):"); Console.WriteLine("宽:" + Screen.PrimaryScreen.WorkingArea.Width); Console.WriteLine("高:" + Screen.PrimaryScreen.WorkingArea.Height);Console.WriteLine("当前显示器完整尺寸:"); Console.WriteLine("宽:" + Screen.GetBounds(this).Width); Console.WriteLine("高:" + Screen.GetBounds(this).Height);Console.WriteLine("当前显示器工作尺寸(排除任务栏、工具栏):"); Console.WriteLine("宽:" + Screen.GetWorkingArea(this).Width); Console.WriteLine("高:" + Screen.GetWorkingArea(this).Height);
标签:Console,Width,C#,Screen,PrimaryScreen,Height,获取,WriteLine,屏幕 From: https://www.cnblogs.com/Kirito-Asuna-Yoyi/p/ScreenGet.html