private void GroupBox_Paint(object sender, PaintEventArgs e) { if (sender != null && sender is GroupBox) { GroupBox gbx = sender as GroupBox; e.Graphics.Clear(gbx.BackColor); Color color = Color.Black; Pen p = new Pen(color, 1); int w = gbx.Width;…
功能:重绘winform的GroupBox,以便调整边框颜色和边框宽度 using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D…