在构造函数里写
this.Paint += new PaintEventHandler(OperationPanel_Paint);
新建一个方法
void OperationPanel_Paint(object sender, PaintEventArgs e)
{
Graphics gLine = e.Graphics;
gLine.DrawLine(Pens.Gray, new Point(55, 57), new Point(320, 57));
gLine.DrawLine(Pens.Black, new Point(55, 58), new Point(320, 58));
gLine.DrawLine(Pens.Gray, new Point(55, 189), new Point(320, 189));
gLine.DrawLine(Pens.Black, new Point(55, 190), new Point(320, 190));
}