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

增加窗体边框3D效果

时间:2015-11-04 12:49:30      阅读:160      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!