Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use an unregistered OCX on the fly?
Message
De
19/03/2007 11:58:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01205530
Message ID:
01205560
Vues:
11
>I would like to use an OCX with a VFP EXE in an "on the fly" manner, without having to register the OCX. Basically, if the OCX file is where the EXE expects it to be, it will use it,and if not, it will do without. Is there a way to use a form.addobject construct with the OCX, possibly within the form's init? Other suggestions? Thanks very much.

You can test to see if you can instantiate the control using CREATEOBJECT() first within a TRY CATCH construct. If that fails you can then try and register it on the fly using:
* Code snippet from Borislav Borissov
DECLARE INTEGER DllRegisterServer IN (full path to ocx here)
DllRegisterServer()
Another option is to include the OCX within your exe file inside a MoleBox or Thinstall wrapper. Then the OCX does not need to be registered at all.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform