2

I would like to create a picture of the ILPanel and copy it to the clipboard or save to disk. Unfortunately, I always get a white image.

Code:

Bitmap bitmap = new Bitmap(ilpnlChart.Bounds.Width, ilpnlChart.Bounds.Height);
ilpnlChart.DrawToBitmap(bitmap, ilpnlChart.Bounds);

Clipboard.SetImage(bitmap);

// TEST
bitmap.Save(@"C:\Temp\chart.jpg");
Felix
  • 29
  • 4

1 Answers1

1

You can use an GDI or SVG renderer in order to export your scene to a static image.

Take a look at http://ilnumerics.net/offscreen-rendering.html

Haymo Kutschbach
  • 3,322
  • 1
  • 17
  • 25
  • Thank you. Somehow I find myself not cope on your website. I've already searched there, but have not found the answer. :-) – Felix Oct 23 '13 at 13:07