Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation Server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00179438
Message ID:
00180279
Vues:
29
Bob, and everyone else who contributed to my questions -- THANKYOU.

I really appreciate the information I have received from everyone concerning my "Visual Automation Server." This appears to be an area where VFP simply isn't the right tool, or simply has not been explored very much. I have not gotten it to work yet, but I will use the suggestions presented here and the response I received from my inquiry to Microsoft.

The following was received from Microsoft when I asked the same questions that I asked in this thread. Again, I just received this info and have not had a chance to try it yet.

Thanks

TFISHER

>>>>>
Hello Terry,

Below is two examples of how to use an automation server. The vcx itself is
the same between the two, just the calling program is different. The first
example is visual, the second is not.

1. Create the ole server

Make a new directory called oletest, and set it as the default directory
Create a new project called oleproj
Create a new class, based on a form, and call it olemain
Store it in OleTest.vcx
Add two command buttons
Cick event of the first button is :
X = TIME()
? X
Click event of the second is:
THIS.PARENT.RELEASE
Add a new method to the class.
To do this, go to the menu, click on the class dropdown, and click on NEW
METHOD
Name it gettime
Click add, this will save the new method.
Double-Click on the form, and go to the method we just added (gettime)
Add the following code:
RETURN TIME()
Go to the menu, click on class dropdown again, and click on Class Info
On the class tab, put a check mark in OLE PUBLIC
Save the class as mainfrmclass

2. Create the calling program (visual)

Create a new program, call it Olevisual
Add the following code:
public xx
set classlib to oletest
xx = createobj("olemain.mainfrmclass")
xx.visible = .t.

3.Createthe other calling program (programatic)

Create another program, call it Olenonvisual
public xx
set classlib to oletest
xx = createobj("olemain.mainfrmclass")
? xx.gettime()

Now you can run either program, and see the difference in the two methods of
creating ole servers.

Please let me know if this does not resolve your issue. If you have any
additional
questions/comments regarding this issue, please reply using the 'create
supplement' button at the bottom of this page.

Thank-You,
John Platt
Microsoft Developer Support
Working Hours: M-TH 9-6 ET
<<<<<
Phone: (425) 635-7064 (ext:66392)
Manager: Alan Schlossberg
Thanks,

TFISHER
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform