Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
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)
---------------------------------
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement