Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OleControl must have container?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00534134
Message ID:
00534610
Vues:
21
This message has been marked as the solution to the initial question of the thread.
>I didn't know ActiveX controls could be that picky about the host environment. You're probably right though. All of the docs and examples say to drop the control on a form.

A way that I have used an OLE control that must be placed on a form is to create a base form object and add your control to it, but not activate the form, just use it to hold your control.

Here is an example:
oDummyForm = CREATEOBJECT("FORM")

* must include the OLE class of the object as fourth parameter of AddObject()
* you can see what it is if you drop the control on a form in the
* form designer and look at the OLEclass property on the property sheet
* on the All or Other tab
oDummyForm.AddObject("oleZipControl","MyZipCtrl","XCEEDZIP.XceedZipCtrl.1")
oMyControl = oDummyForm.oleZipControl
In this example I am creating a reference to my customized XCEEDZIP control. I defined the CLASS "MyZipCtrl" in a PRG and use this method to create an instance of it.

Be sure to release both variables to release the instance of your control.

Hope this helps,
-Lou.
"All my life I said I wanted to be someone ...
I can see now that I should have been more specific." -Jane Wagner
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform