Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with msgraph5 and msgraph 8
Message
From
15/05/1998 06:36:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00099677
Message ID:
00099682
Views:
27
>Excuse my english but i'm french...
>I have a problem with visual fox pro because my program use msgraph5  with
>the command (append general olegraph.....)
>last week i install office 97 and my program doesn't work... there are an
>error when i load graphic (OLE error 0x80020006 name unknown)
>I know it's a problem between msgraph97 and msgraph5 but i don't know how to
>resolve it....
>please help me it's very important
>
>
>email : vassalc@hotmail.com
Some of MSgraph5 commands changed in MSGraph8. It's not "append general ..." causing the error. If you could paste the actual code interfering with graph object I could help you. Anyway here is an example
*!*	Below example is for MSGraph8. PEM are quite like Excel8 PEM
*!*	xlConstants can be found by :
*!*	-Open Excel
*!*	-Select tools\macro\VB editor
*!*	-Press F2 to bring up "Object browser"
*!*	-Find needed xlConstant type ie:xlChartType
*!*	-On right window click needed Constant ie: xl3DArea
*!*	-Below the window constant value is displayed
*!*	-Rather kludgy but currently the only way I know to find them

oForm = createobject("Form")
oForm.height = 400
oForm.width = 600
oForm.show

create cursor test (val1 i, val2 n(8,4) NULL, val3 n(8,4))
for ix = 1 to 90
	insert into test ;
	  values ;
	  (ix,cos(ix)*ix,sin(ix)*ix)
endfor 
45
scan next 30     && Nullify 30 degrees
	replace val2 with .null.       && Nullify some values to see effect
endscan

***
* Prepare data for MSGraph object
***
#DEFINE TAB CHR(9)
#DEFINE CRLF CHR(13)+CHR(10)
M.CGDATA = "Degree"+TAB+"Cosine"+TAB+"Sine"+CRLF
scan
    m.cgdata = m.cgdata+;
               str(nvl(val1,0))+TAB+;
               str(nvl(val2,0))+TAB+;
               str(nvl(val3,0))+CRLF
endscan
create cursor test (gen1 g)
append blank
append general gen1 class "msgraph.chart" DATA M.CGData
***
* Now we have an MSGraph object
* Play with it
***
oForm.addobject("myGraph","OleBoundControl")
oForm.addobject("myQuit1","myQuit")
with oForm.myGraph
  .height = oForm.height - 20
  .width = oForm.width 
  .left = 0
  .top = 0
  .ControlSource = "test.Gen1"
  .HasLegend = .t.
*  .autoformat(1, 1)
  .autoformat(-4098,1)  && xl3dArea
*  .autoformat(-4101, 1)  && xl3dLine
  .visible = .t.
  .object.application.plotby = 2  && Data in columns, 1 in rows - best for table data
endwith
oForm.myQuit1.visible = .t.
read events

define class myquit as commandbutton
left=1
top=1
Caption="Close"
procedure click
	clear events
endproc
enddefine
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform