C# 获取屏幕尺寸

 1  
 2  
 3 不包含任务栏的屏幕尺寸
 4 int width = System.Windows.Forms.SystemInformation.WorkingArea.Width;
 5 int height = System.Windows.Forms.SystemInformation.WorkingArea.Height;
 6 
 7 包括任务栏的屏幕尺寸
 8 
 9 int width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
10 int height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;

 

 
posted @ 2013-12-18 17:52  青田  阅读(612)  评论(0编辑  收藏  举报