原理就是手动去画边框留出四个角 然后绘制四张圆弧的图片到panel上
public class ArcPanel : Panel { protected override void OnPaint(PaintEventArgs e) { Pen pen = ); ; e.Graphics.DrawLine(pen, ), ));//上 e.Graphics.DrawLine(pen, , wdh), , this.Height - wdh)); //左 e.Graphics.DrawLine(pen, , wdh), , this.Height - wdh));//右 e.Graphics.DrawLine(pen, ), ));//下 Image imgLeftTop = global::WinGPChat.Properties.Resources.jiao01; Image imgRightTop = global::WinGPChat.Properties.Resources.jiao03; Image imgRightBottom = global::WinGPChat.Properties.Resources.jiao03_04; Image imgLeftBottom = global::WinGPChat.Properties.Resources.jiao04; e.Graphics.DrawImage(imgLeftTop, , )); e.Graphics.DrawImage(imgRightTop, )); e.Graphics.DrawImage(imgRightBottom, new Point(this.Width - imgRightBottom.Width, this.Height - imgRightBottom.Height)); e.Graphics.DrawImage(imgLeftBottom, , this.Height - imgLeftBottom.Height)); base.OnPaint(e); } Color _borderColor = Color.FromArgb(, , ); public Color BorderColor { get { return _borderColor; } set { _borderColor = value; this.Invalidate(); } } }