C#获取屏幕大小的“简单整理”。
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);