'宣言 Public Overloads Sub SaveTo( _ ByVal stream As Stream, _ ByVal imageType As ImageFormat _ )
public void SaveTo( Stream stream, ImageFormat imageType )
このメソッドは現在のチャート画像をストリームに保存します。ストリームは開いたままであるため、ストリームを閉じるためにこのメソッドを呼び出すのはアプリケーションです。
' create a stream to save the chart image to Dim mS as New System.IO.MemoryStream() ' call the SaveTo method using the Stream and any ImageFormat Me.UltraChart1.SaveTo(mS, System.Drawing.Imaging.ImageFormat.Bmp) ' it is possible to retrieve the image later using Image.FromStream Dim myImage as System.Drawing.Image = System.Drawin.Image.FromStream(mS) ' or, just save the chart using a specified file path. this.ultraChart1.SaveTo(Application.StartupPath & "\myChart.png", System.Drawing.Imaging.ImageFormat.Png)
// create a stream to save the chart image to System.IO.MemoryStream mS = new System.IO.MemoryStream(); // call the SaveTo method using the Stream and any ImageFormat this.ultraChart1.SaveTo(mS, System.Drawing.Imaging.ImageFormat.Bmp); // it is possible to retrieve the image later using Image.FromStream System.Drawing.Image myImage = System.Drawing.Image.FromStream(mS); // or, just save the chart using a specified file path. this.ultraChart1.SaveTo(Application.StartupPath + @"\myChart.png", System.Drawing.Imaging.ImageFormat.Png);