tChart is not drawn when I draw the whole Form to bitmap
Posted: Wed Oct 12, 2011 1:29 pm
I want to draw a whole System.Windows.Form to Bitmap (make a screenshot of the form). Everything works fine, and all controls are drawn to the bitmap. The only exception is that the tChart contained in the Form does not appear in the bitmap. I ise the following code:
private void button1_Click(object sender, EventArgs e)
{
Bitmap m_oScreenshot = new Bitmap(Width, Height);
Rectangle r = new Rectangle(0, 0, Width, Height);
this.DrawToBitmap(m_oScreenshot, r);
m_oScreenshot.Save("D:\\temp\\Test.bmp");
}
this means the form itself.
What can I do that the Chart is drawn to the bitmap? Thanks in advance.
private void button1_Click(object sender, EventArgs e)
{
Bitmap m_oScreenshot = new Bitmap(Width, Height);
Rectangle r = new Rectangle(0, 0, Width, Height);
this.DrawToBitmap(m_oScreenshot, r);
m_oScreenshot.Save("D:\\temp\\Test.bmp");
}
this means the form itself.
What can I do that the Chart is drawn to the bitmap? Thanks in advance.