>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:
This.oSaveAs = CREATEOBJECT('MSComDlg.CommonDialog.1')
This.AddObject("MyTree", "OLEControl", "MSComctlLib.Treectrl.2")
hth,
George
Ubi caritas et amor, deus ibi est