Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to register Activex control within VFP
Message
 
To
20/09/2002 17:12:37
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00702937
Message ID:
00702956
Views:
8
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform