0
在我的節目,我保存圖表通過執行以下操作:如何將表單保存爲文件的圖像?
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
chart.SaveImage(saveFileDialog.FileName, ChartImageFormat.Bmp);
}
但我怎麼拯救整個形式,其中圖表所在?
更新:
我找到了一個解決方案:
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
Bitmap bm = new Bitmap(this.Width, this.Height);
Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
this.DrawToBitmap(bm, rect);
bm.Save(saveFileDialog.FileName, ImageFormat.Bmp);
}
當問題被標記爲重複時,我如何找到他們參考的消息? –