Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Visio to a Form?
Message
De
06/07/2003 12:25:51
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Adding Visio to a Form?
Divers
Thread ID:
00807256
Message ID:
00807256
Vues:
55
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
Fil
Voir

Click here to load this message in the networking platform