Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Visio to a Form?
Message
From
06/07/2003 12:25:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Adding Visio to a Form?
Miscellaneous
Thread ID:
00807256
Message ID:
00807256
Views:
54
How do I add a visio document to a FoxPro form and run the same type of Example code below. I have tried every thing I know. The following code opens an external visio document and draws a line.

I would like insert the visio document directly onto a foxpro form and automate the document just like the code below.

I have tried to use ole bound contols but I do not have access to all these methods and properties.

I have seen examples in visual basic. Maybe it can not be done in FoxPro. I thought FoxPro 8 could do anything VB could?


Example code:
----------------------------
PUBLIC AppVisio, DocsVisio, AppPage,DocPage, MasterDoc, MasterObject, RectObject, WindowObject
appVisio = CREATEOBJECT("Visio.application")
DocsVisio = AppVisio.Documents
** Creates a pointer to a new visio document based on the Rumbaugh method

VisioDoc = DocsVisio.Add ("basic.vst")
** These are two references to the same page.
AppPage = AppVisio.ActivePage
DocPage = VisioDoc.Pages(1)
? AppPage.Name
? DOCPAGE.Name
DocPage.Name = "Demonstration for Conference"

** Now Pages Contain SHAPES...
** SHAPES can either be drawn outright using the DrawLine, DrawOval and DrawRectangle Methods
DocPage.DrawLine(1,9,3,10)
---------------------------------
Next
Reply
Map
View

Click here to load this message in the networking platform