在窗體的Paint事件中加入以下代碼
// 重繪窗體
private void VIEwInstanceDialog_Paint(object sender, PaintEventArgs e)
...{
// 為窗體中畫線
Graphics line = CreateGraphics();
line.DrawLine(new Pen(Color.Gray, 1), new Point(10, 280), new Point(Width - 20, 280));
line.DrawLine(new Pen(Color.White, 1), new Point(10, 281), new Point(Width - 20, 281));
}