Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSCHART, Can be printed?
Message
De
23/11/2001 05:14:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/11/2001 02:37:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00585060
Message ID:
00585070
Vues:
56
This message has been marked as a message which has helped to the initial question of the thread.
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform