Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add ms-excel
Message
De
02/12/2003 04:13:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/12/2003 03:31:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00854922
Message ID:
00854936
Vues:
20
>hi Cetin,
> i want only to insert a simple graph for my forcasting program, do you have any suggestions how to preview a graph into the form.
>
>thanks.

Oh my :) You should ask that way before.
Then either :
-Use native fox controls (Line,.Line etc)
-MSChart2.0 activex (search for sample code here)
-OWC chart control (check west-wind.com for samples)
-MsGraph (samples here and solution.app)
-Excel charting (but not on form FWIW)

A simple MSChart2.0 sample :
oForm=createobject('form1')
oForm.Show
Read events

#INCLUDE "mschrt20.h"
Define CLASS form1 AS form
  Top = 0
  Left = 0
  Height = 520
  Width = 790
  DoCreate = .T.
  Name = "Form1"

  Add OBJECT mschart AS olecontrol WITH ;
    Top = 10, ;
    Left = 5, ;
    Height = 500, ;
    Width = 780, ;
    Name = "MsChart", ;
    OleClass = 'MSChart20Lib.MsChart'

  Procedure Init
    Select country,sum(maxordamt) ;
    	from customer ;
    	group by 1 ;
    	into cursor crsChart
    lcTemp = Sys(2015)+".tmp"
    Copy To (lcTemp) type delimited with "" with tab
    _cliptext = FileToStr(m.lcTemp)
    Erase (m.lcTemp)
    Thisform.mschart.Editpaste
  Endproc

Procedure QueryUnload
	Clear events
endproc
Enddefine
PS: MSGraph and MSExcel are a little heavy to display charts on a form.
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