Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 .net Compact Framework 3.5 中绘制一条水平线,就像Owner Information在 Windows Mobile 6.5 中使用的那样,将标题和正文分开?
Owner Information
执行此类操作的最简单方法是覆盖Paint事件:
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); } }