General information
Category:
COM/DCOM and OLE Automation
Title:
Adding Visio to a Form?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only