首页 > Windows开发 > 详细

增加窗体边框3D效果

时间:2015-11-04 12:46:14      阅读:354      评论:0      收藏:0      [点我收藏+]
 /// <summary>
        /// 增加窗体边框3D效果
        /// </summary>
        /// <param name="e"></param>
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            using (Pen bluePen = new Pen(Color.FromArgb(141, 178, 196)))
            {
                e.Graphics.DrawLine(bluePen, 1, 1, this.Width - 2, 1);
                e.Graphics.DrawLine(bluePen, 1, 1, 1, this.Height - 2);
                e.Graphics.DrawLine(bluePen, 1, this.Height - 2, this.Width - 2, this.Height - 2);
                e.Graphics.DrawLine(bluePen, this.Width - 2, 1, this.Width - 2, this.Height - 2);
            }
        }

 

增加窗体边框3D效果

原文:http://www.cnblogs.com/yomho/p/4935373.html

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