菜鸟求助,关于图像清除的问题
小猪飞剑 2012-04-13 11:11:12 先贴个简单的代码
private void button1_Click(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(pictureBox1.Image);
Graphics g = Graphics.FromImage(bmp);
g.DrawLine(new Pen (Color .Red ,5) , 10, 10, 30, 30);
g.Dispose();
this.pictureBox1.Image = bmp;
}
就是说在picturebox里画了个线
然后。。。我想知道怎么点击另一个按钮的时候清除它
那个。。不要告诉我再用背景色画一次,那个方法太脑残了
谢谢了