网站首页 博客 C#重绘panel边框
panel边框设置为none
双击panel进入代码,例如
//重绘panel_sign边框
private void panel_sign_Paint(object sender, PaintEventArgs e)
{
ControlPaint.DrawBorder(e.Graphics, panel_sign.ClientRectangle, Color.LightGray, ButtonBorderStyle.Solid);
/*ControlPaint.DrawBorder(e.Graphics, panel_sign.ClientRectangle,
Color.Pink, 1, ButtonBorderStyle.Solid, //左边
Color.Pink, 1, ButtonBorderStyle.Solid, //上边
Color.DimGray, 1, ButtonBorderStyle.Solid, //右边
Color.DimGray, 1, ButtonBorderStyle.Solid //底边
);*/
}