-
May 22nd, 2014, 12:04 PM
#1
saving multiple charts in one document
I'm looking for a way to save 3 different charts in one document.
My application calculates data. This data will be shown in 3 different charts ( toolbox --> charts)
So far I've this code:
Code:
01 ' Displays a SaveFileDialog so the user can save the Image
02 ' assigned to Button2.
03 Dim saveFileDialog1 As New SaveFileDialog()
04 saveFileDialog1.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif"
05 saveFileDialog1.Title = "Save an Image File"
06 saveFileDialog1.ShowDialog()
07
08 ' If the file name is not an empty string open it for saving.
09 If saveFileDialog1.FileName <> "" Then
10 ' Saves the Image via a FileStream created by the OpenFile method.
11 Dim fs As System.IO.FileStream = CType _
12 (saveFileDialog1.OpenFile(), System.IO.FileStream)
13 ' Saves the Image in the appropriate ImageFormat based upon the
14 ' file type selected in the dialog box.
15 ' NOTE that the FilterIndex property is one-based.
16 Select Case saveFileDialog1.FilterIndex
17 Case 1
18 Chart1.SaveImage(fs, _
19 System.Drawing.Imaging.ImageFormat.Jpeg)
20
21 Case 2
22 Chart1.SaveImage(fs, _
23 System.Drawing.Imaging.ImageFormat.Bmp)
24
25 Case 3
26 Chart1.SaveImage(fs, _
27 System.Drawing.Imaging.ImageFormat.Gif)
28 End Select
However it only saves the image of chart 1. Is there a way i can combine chart 1,2,3 images in one document?
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|