Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ActiveX EXE
Message
From
26/10/1998 10:11:28
 
 
To
26/10/1998 09:48:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00150471
Message ID:
00150484
Views:
16
>Can anyone tell me how to make use of an ActiveX EXE? I have the function that I need to call within the exe, but don't know how to set up a form or method to initialize and call it.
>

You need to make a connection to the ActiveX server; in VFP this is done via CREATEOBJ(). Your server is registered with a ProgID; you instantiate it in your VFP app, regardless of the type of server (in or out of process) by doing a CREATEOBJ() referencing the ProgID. If the server were registered on your system with the ProgID MyApp.MyActiveXServer, you'd:

oMyServer = CREATEOBJ('MyApp.MyActiveXServer')

If the server is not running, it will cause the system (either on your local machine or on a remote system if it's a remote out of process server and has been set up properly) to start an instance of the server. You then access the server's methods and properties just like any other VFP object, for example:

cMyString = oMyServer.SomeServerProperty

or

lResult = oMyServer.DoWhatIWant('Some String parameter',42)

>Any help would be greatly appreciated.
>
>Scott Fitzgerald
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform