2012-04-11 166 views
1

如何在.net Compact Framework 3.5中繪製水平線,與Windows Mobile 6.5中的Owner Information中使用的水平線相同,它將標題和正文分開?.net Compact Framework中的分隔符控件

enter image description here

+1

您可以編輯本添加你在說什麼的屏幕截圖?我不明白。 – jp2code 2012-04-12 13:49:26

+1

@ jp2code這裏是屏幕截圖 – 2012-04-12 14:56:00

回答

1

做類似的東西,最簡單的方法是重寫Paint事件:

private const int HORZ_LINE = 10; 

private void Form_Paint(object sender, PaintEventArgs e) { 
    using (Pen p = new Pen(Color.Black)) { 
    e.Graphics.DrawLine(p, 0, HORZ_LINE, Width, HORZ_LINE); 
    } 
} 
相關問題