我正在尝试在C#中保存并打印面板。我的唯一问题是它只保存可见区域,当我向下滚动时会打印出那部分。
Bitmap bmp = new Bitmap(this.panel.Width, this.panel.Height);
this.panel.DrawToBitmap(bmp, new Rectangle(0, 0, this.panel.Width, this.panel.Height));
bmp.Save("c:\\panel.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);