public Form1()
{
InitializeComponent();
bmp = new Bitmap(this.Width, this.Height);
} Bitmap bmp; private void button1_Click(object sender, EventArgs e)
{
Graphics gs1 = Graphics.FromImage(bmp);
gs1.DrawString("测试", this.Font, Brushes.Blue, 100, 100);
this.CreateGraphics().DrawImage(bmp, 0, 0);
} private void Form1_Paint(object sender, PaintEventArgs e)
{
this.CreateGraphics().DrawImage(bmp, 0, 0);
}
{
InitializeComponent();
bmp = new Bitmap(this.Width, this.Height);
} Bitmap bmp; private void button1_Click(object sender, EventArgs e)
{
Graphics gs1 = Graphics.FromImage(bmp);
gs1.DrawString("测试", this.Font, Brushes.Blue, 100, 100);
this.CreateGraphics().DrawImage(bmp, 0, 0);
} private void Form1_Paint(object sender, PaintEventArgs e)
{
this.CreateGraphics().DrawImage(bmp, 0, 0);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货