首页 > Windows开发 > 详细

C#获取Windows屏幕尺寸

时间:2015-03-11 10:30:15      阅读:343      评论:0      收藏:0      [点我收藏+]

在C#中,可以使用System.Windows.SystemParameters获取有关屏幕真实状态的基本信息。

  1. 获取屏幕像素:

    使用
       SystemParameters.FullPrimaryScreenHeight

              SystemParameters.FullPrimaryScreenWidth

  2. 获取工作区(不包括任务栏)像素:

    使用
     SystemParameters.WorkArea.Height
     SystemParameters.WorkArea.Width

 

C# 获得屏幕大小 
Rectangle rect=System.Windows.Forms.SystemInformation.VirtualScreen; 
int width=rect.Width; 
int height=rect.Height; 

C#获取Windows屏幕尺寸

原文:http://www.cnblogs.com/haifan1984/p/4329039.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!