protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
using (Pen bluePen = new Pen(Color.Red, 1))
{
if (ClientRectangle.Height / 10 > 0)
{
for (int y = 0; y < ClientRectangle.Height; y += ClientRectangle.Height / 10)
{
g.DrawLine(bluePen, new Point(0, 0), new Point(ClientRectangle.Width, y));
}
}
}
}
求大神指教Graphics g = e.Graphics; 这句话是什么意思呢?