Bitmap bm = new Bitmap(pnlMain.Width, pnlMain.Height); Graphics tem = Graphics.FromImage(bm); …… tem.Draw();//使用tem完成所有绘图 …… g = pnlMain.CreateGraphics(); g.DrawImage(bm,new Point(0,0));