您的位置:首页 > 其它

增加窗体边框3D效果

2015-11-04 11:12 239 查看
/// <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);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: