Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Active X Object
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00230088
Message ID:
00230141
Views:
27
>How can I implement and active X (ocx file) in an application without dropping it onto a form? This is copy protection software and I am trying to create an object defined through a calss that specifies the ocx file I am implementing.
>
>My class looks like this:
>
>DEFINE CLASS SoftProtectionX1 as OLEControl
> DocumentFile = "D:\source\vfp\dev\SoftProtectionX1.ocx"
>ENDDEFINE
>
>My create code looks like:
>
>SoftProt=CreateObject("SoftProtectionX1")
>SoftProt.Execute
>
>Thanks,
Hi Mike,

You'll need to find out what the OLE class name is for the control. You can find out by looking at the OLEClass property on the property sheet. Here a couple of examples:
* Creates a reference to the Common Dialogs ActiveX control
This.oSaveAs = CREATEOBJECT('MSComDlg.CommonDialog.1')
* Uses AddObject to add a treeview control
This.AddObject("MyTree", "OLEControl", "MSComctlLib.Treectrl.2")
hth,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform