Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Urgent: How Can I create OCX in vfp?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00251512
Message ID:
00251523
Views:
10
>How can I create OCX in vfp6 or how can I use vcx in VB6?
>

You can create a COM component in VFP6, but not an ActiveX control. VFP does not have the ability to create a control that will participate in the WIndows event loop of a client applciation directly.

You can access functionality from a VCX in a VB application by creating a project that contains the VCX and publishes the necessary class(es) as OLEPUBLIC, and creating an in-process (.DLL) or out-of-process (.EXE) COM component. the Com component and appropriate runtime library files would be installed on each client system (yes, that means that you have to distribute the VFP runtime with the COM object after it's been compiled, and the component would have to be registered on each system as well. Copying the files onto a target system will not install the necessary files properly.) VB would then access the COM component as it would any other COM component created with any other tools.

Again, you can't create UI interactive events with VFP; an in-process VFP component can't have any UI elements, and while an out-of-process server can have a UI component, it runs outside the client environment and isn't equivalent to creating an ActiveX control. IMO, you create singificant problems attempting to publish a VFP UI through an out-of-process server, but that's my opinion based on the techniques I've used to date, not an exhaustive knowledge of all the potential issues with UI instantiation in out-of-process environments.

The VFP Programmer's Guide discusses how to create COM Objects in detail in Chapter 16 of the Programmer's Guide, Adding OLE, which is part of the on-line documentation for VFP6.

>Replye me ASAP.
>
>Ashish Kanoongo
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
Reply
Map
View

Click here to load this message in the networking platform