|
Print and Save image with chartDirector in VB6 |
Posted by alex on Jan-07-2011 06:40 |
|
Hi everyone!
I have a problem with chartDirector for VB6.
I created a chart, but I need to print and save it.
Do you know how i could do it? Do you have an example pleaseee?
Please help me =] !!
Thank you!!! |
Re: Print and Save image with chartDirector in VB6 |
Posted by Peter Kwan on Jan-08-2011 01:05 |
|
Hi Alex,
You may save a chart using the BaseChart.makeChart API. It can be saved as BMP, PNG, JPG, GIF. For example:
Call c.makeChart("c:\\aaa.png")
ChartDirector charts are standard picture objects (the same as the standard VB PictureBox). You can print them just like printing a standard Picture or Image in VB6. For example:
'print everything on a VB6 form, including the chart
Me.PrintForm
or
'Use the VB Printer object to print the picture in a specific location on paper at a specific physical size
'Remember in VB, the coordiantes may be specified in TWIPS
Printer.NewPage
Printer.PaintPicture ChartViewer1.Picture, 0, 0, 400 * 15, 350 * 15
Printer.EndDoc
Hope this can help.
Regards
Peter Kwan |
Re: Print and Save image with chartDirector in VB6 |
Posted by susan on Jun-14-2013 12:30 |
|
hi there, quick searching on Google brings me here.and Im working on image saving,Is the codes above written in VB.Net? If yes ,Plz give me some detail tutorails ,thx in adv.as a beginner in image programming ,I just can't figure out which open source code is best suiting me, like image saving and printing sample codes http://www.rasteredge.com/how-to/vb-net-imaging/imaging-saving-printing/ found by Google as well as your site.Any suggestion is appreciated. |
|