Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to register Activex control within VFP
Message
 
À
20/09/2002 17:12:37
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00702937
Message ID:
00702956
Vues:
9
>Hi all,
>
>How do I detect within a VFP program if an Activex control has been
>registered successfully on a Windows machine (NT4 and WIN 2K) and if it does
>not exist in the machine, how do I register the control programmatically
>within a VFP program?
>
>We are still using VFP5. We are trying to upgrade an VFP program with
>a newly purchased calendar activex control. There are about 50 machines
>already running the application.
>
>Thanks.
>
Kam,

To answer the first question, use the Registry.prg that came with VFP 5.0, like this
SET PROCEDURE TO Registry ADDITIVE
oReg = CREATEOBJECT('Registry')
? oReg.IsKey(< ProgID >)
While I don't recall if the program version of the registry class had this function (the vcx version does), there is a work around if it doesn't.
? (oReg.OpenKey(< ProgID >) = 0)
If it the key exists, the value will be true. You'll then have to close the key according. Otherwise, as I'm sure Sergey's response points to, you can use DLLRegisterServer, in the OCX after copying the control to the system directory.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform