只生成图片
生成图片并显示到panel里
黑色头发:http://heisetoufa.iteye.com/
string nullPath ="C:\\黑色头发.jpg";
Bitmap b = new Bitmap(1,1);
b.Save(nullPath);
b.Dispose();
生成图片并显示到panel里
Bitmap b = new Bitmap(this.panel1.Width, this.panel1.Height);
this.panel1.DrawToBitmap(b, new Rectangle(0, 0, this.panel1.Width, this.panel1.Height));
b.Save("C:\\黑色头发.jpg");
黑色头发:http://heisetoufa.iteye.com/