Winfrom 重绘dataGridView边框颜色(SourceGrid、Panel通用)

该空间Pain事件中添加如下代码

private void DataGridCurrent_Paint(object sender, PaintEventArgs e)

        {

                DataGridView dataGridView = senderasDataGridView;

                ControlPaint.DrawBorder(e.Graphics,dataGridView.ClientRectangle,Color.DeepSkyBlue,1,

                    ButtonBorderStyle.Solid,

                    Color.DeepSkyBlue,1,ButtonBorderStyle.Solid,Color.DeepSkyBlue, 1,ButtonBorderStyle.Solid,Color.DeepSkyBlue, 1,ButtonBorderStyle.Solid);

        }

你可能感兴趣的:(Winfrom 重绘dataGridView边框颜色(SourceGrid、Panel通用))