Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSCHART, Can be printed?
Message
 
To
23/11/2001 05:14:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00585060
Message ID:
00585677
Views:
34
>>Hi to all,
>>
>>Can I print the Chart created in MSChart control?
>>
>>Thanks in advance.
>>
>>Noel
>
>Noel,
>MsChart control doesn't have a method to print or save. However you can still do it in at least 3 ways :
>1) Call MSChart.EditCopy and paste this to somewhere else. ie: You could create a cursor with a general field and paste special there (DIB). A general field could be printed via report.
>
>2) On MSDN online check Q97193 WinCap.exe has DIBApi32.dll which you can use to either save or print clipboard content that you saved with MSChart.Editcopy.
>
>3) Last and easiest IMHO is to use George Tasker's 'Obj2BMP' which you could find in download section. Utility is great (thanks George) in few lines you could save to a .bmp file. If utility is in public domain here is the sample code to save to a bmp :
>
>
>set library to home()+'foxtools.fll' additive
>lnBPP = 24 && Color depth - 4,8 or 24
>oBmp = newOBJECT("BMPMaker","BmpMaker.prg")
>oBmp.cFileName = 'mschartsave.bmp' && Save filename
>with ThisForm.MsChart
> oBmp.MakeBitmap(_WhToHwnd(_WOnTop()), lnBPP, ;
>  .top+sysmetric(9)+sysmetric(4), .left+sysmetric(3), .height, .width)
>endwith
>
You could print this file in many different ways including getting into a temp cursor general field.

Cetin,

Thanks for the mention. It's especially gratifying to see someone take it beyond the bounds of its original design.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform