码迷,mamicode.com
首页 > Windows程序 > 详细

自定义窗体位置

时间:2018-12-12 13:23:38      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:定义   bounds   图片   class   code   alt   top   screen   inf   

 private void PointXY()
        {
            Point sp = new Point(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
            this.Left = 20;
            this.Top = (sp.Y - this.Height) / 2;
        }

技术分享图片设置属性

 

自定义窗体位置

标签:定义   bounds   图片   class   code   alt   top   screen   inf   

原文地址:https://www.cnblogs.com/shuaimeng/p/10107719.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!