如何清除panel画板上所绘的图像

解决方案 »

  1.   

    如果是用 
    Graphics myPic = this.panel1.CreateGraphics(); 
    Bitmap myBit = new Bitmap("a.bmp", false); 
    myPic.DrawImage(myBit, 0, 0,300,300); 
    这种方法绘制的话,可以直接  panel1.Refresh();
      

  2.   

    Graphics g= this.panel1.CreateGraphics(); 
    g.Clear(Color.White); 
      

  3.   

     谢了 现在已经搞定了 
    这方法在做画图软件时用不了啊 那些图元都是+进了arraylist数组里面的 之后才是绘制出panel中的,用g.clear(color)还是无法清除