我有一个带有控件的表单,我需要捕获此表单以进行图像。请帮我。谢谢。

最佳答案

//Control cntrl; previously declared and populated
            Bitmap bmp = new Bitmap(cntrl.Width,cntrl.Height);
            cntrl.DrawToBitmap(bmp, new Rectangle(Point.Empty, bmp.Size));

09-28 04:05