首页 > 其他 > 详细

c#抓取当前电脑显示分辨率

时间:2014-09-24 17:44:08      阅读:245      评论:0      收藏:0      [点我收藏+]

 using System.Windows.Forms;
            

获取屏幕分辨率
            int SH = Screen.PrimaryScreen.Bounds.Height;
            int SW = Screen.PrimaryScreen.Bounds.Width;  

           

获取窗口居中Top和Left
            int thisH=100;
            int thisW=200;
            int SH = (Screen.PrimaryScreen.Bounds.Height - 30 - thisH) / 2;
            int SW = (Screen.PrimaryScreen.Bounds.Width - 10 - thisW) / 2;

c#抓取当前电脑显示分辨率

原文:http://www.cnblogs.com/skyay/p/3991041.html

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