1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| chartIta.Size = new Size(740, 580);
Form frmDisplay = new Form();
frmDisplay.ShowInTaskbar = false;
frmDisplay.StartPosition = FormStartPosition.CenterParent;
frmDisplay.Size = new Size(740, 580);
// create a memory stream to save the chart image
System.IO.MemoryStream stream = new System.IO.MemoryStream();
// save the chart image to the stream
chartIta.SaveImage(stream,System.Drawing.Imaging.ImageFormat.Bmp);
// create a bitmap using the stream
Bitmap ImagePlot = new Bitmap(stream);
// put the image in a control box
PictureBox picBox = new PictureBox();
picBox.Size = new Size(740, 580);
picBox.Dock = DockStyle.Fill;
ImagePlot.Size = new Size(740, 580);
frmDisplay.Controls.Add(picBox);
frmDisplay.ShowDialog();
stream.Dispose(); |
Partager