2010-07-04 39 views

回答

2

您不能直接改變邊框的顏色,但是,您繪製自己在任何你想要的顏色和樣式。請參閱this article

來自文章的代碼示例。 (這就是你所需要的。)

private void panel1_Paint(object sender, PaintEventArgs e)  { 
    ControlPaint.DrawBorder(e.Graphics, this.panel1.ClientRectangle, 
    Color.DarkBlue, ButtonBorderStyle.Solid); 
} 

private void panel1_Resize(object sender, EventArgs e) 
{ 
    Invalidate(); 
} 
+0

謝謝保羅, 這正是我所需要的。 – 2010-07-05 08:36:04

相關問題