private void Form1_Paint(object sender, PaintEventArgs e)
{
bmp = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
Graphics gBmp = Graphics.FromImage(bmp);//内存位图
Graphics gForm = e.Graphics;//Form
for (int i = 1; i < 20; i++)
{
System.Drawing.Font f = new Font("宋体", i, FontStyle.Regular);
gForm.DrawString("this is a test", f, Brushes.Black, new PointF(10f, i*Font.Height));
gBmp.DrawString("this is a test", f, Brushes.Black, new PointF(0f, i * Font.Height));
}
gForm.DrawImage(bmp, new Point(200, 0));
}