FoxPro/Visual FoxPro - Control Ole

 
Vista:

Control Ole

Publicado por Analia (46 intervenciones) el 15/08/2006 15:14:53
Hola !!, necesito saber como se usa el control Ole MSChart, para enlazarlo ha una tabla
para mostrar las ventas hechas por mes en lo que va del año.
Si alguien tiene algun ejemplo que me lo pueda pasar, se lo agradecere.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Control Ole

Publicado por Plinio (7841 intervenciones) el 15/08/2006 16:56:02
Para comenzar:

http://80.24.123.135/revista/Num0402/art.htm

http://80.24.123.135/revista/Num1202/art.htm
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Control Ole

Publicado por Carlos Ayala Garlaraza (169 intervenciones) el 15/08/2006 17:41:36
Hola amiguita

Te paso un codigo que te genra lo que tu quieres solo copialo y ejecutalo ai podras ver todo...
*****************************************************************************************
PUBLIC chartdemo
chartdemo=CREATEOBJECT('chartdemo')
chartdemo.SHOW

DEFINE CLASS chartdemo AS FORM

TOP = 0
LEFT = 0
HEIGHT = 250
WIDTH = 360
DOCREATE = .T.
CAPTION = "MSChart Control"
NAME = "Form1"

ADD OBJECT olecontrol1 AS OLECONTROL WITH ;
TOP = 24, ;
LEFT = 42, ;
HEIGHT = 181, ;
WIDTH = 277, ;
VISIBLE = .F., ;
NAME = "Olecontrol1", ;
OLECLASS="MSChart20Lib.MSChart.2"

ADD OBJECT command1 AS COMMANDBUTTON WITH ;
TOP = 216, ;
LEFT = 24, ;
HEIGHT = 24, ;
WIDTH = 121, ;
CAPTION = "\<Show Chart", ;
NAME = "Command1"

ADD OBJECT command2 AS COMMANDBUTTON WITH ;
TOP = 216, ;
LEFT = 216, ;
HEIGHT = 24, ;
WIDTH = 120, ;
CAPTION = "E\<xit", ;
NAME = "Command2"

PROCEDURE command1.CLICK
WITH THISFORM.olecontrol1
*!* Display a 3d chart with 8 columns and 8 rows of data.
.ChartType = 0 && VtChChartType3dBar
*!* Set the number of columns to 8
.COLUMNCOUNT = 8
*!* Set the number of rows to 8
.RowCount = 8

*!* Populate the DataGrid Object.
FOR lnCol = 1 TO 8
FOR lnRow = 1 TO 8
.COLUMN = lnCol
.ROW = lnRow
.DATA = lnRow * 10
NEXT ROW
NEXT COLUMN
*!* Use the chart as the backdrop of the legend.
.ShowLegend = .T.
*!* Select Chart Part 1
.SelectPart(1,1,1,1,1) && VtChPartTypePlot, index1, index2, index3, index4)
*!* Copy the chart to the clipboard in Windows Metafile format.
.EditCopy
*!* Select Chart Part 1
.SelectPart(1,1,1,1,1) && VtChPartTypeLegend, index1, index2, index3, index4)
*!* Paste the Windows Metafile graphic from the clipboard into the chart
.EditPaste
*!* Set the chart object visible
.VISIBLE=.T.
*!* Refresh the chart object
.REFRESH
ENDWITH
THISFORM.REFRESH
ENDPROC

PROCEDURE command2.CLICK
WITH THISFORM
.RELEASE
ENDWITH
ENDPROC

ENDDEFINE

********************************************************************
suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar