Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I check that a control is registered?
Message
From
23/08/1999 12:25:52
 
 
To
22/08/1999 23:53:20
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00255904
Message ID:
00256641
Views:
19
>The control is dropped onto the form at design time. If, for some reason, the control has not been installed properly by the installation system (e.g., somebody copied the EXE to another system), I'd like control the death of the program or subsystem.
>
>We could AddObject() the controls at run time, but I'm hoping for a better way...
>
>The reference to the GUID is that as far as I can see looking at the Registry, the only keys to find the control are the GUIDs. I suspect I'm wrong about this, but I am ignorant of manipulating the Registry [hence my question :) ]
>
>Bruce

Windows first uses the ProgID to find the control's GUID. VFP only references the ProgID. When you instanciate the control, windows Looks up the ProgID in HKEY_CLASSES_ROOT to find the GUID, and then looks up the GUID in HKEY_CLASSES_ROOT to find the location of the host file. The problem with dropping the control on the form at design time is that VFP stores the version specific ProgID in the form definition, and then looks for that ID in the registry. This will break your program if only a different version of the control resides on the workstation. But you can get around this by using the version generic ProgID and doing an AddObject at runtime. You could have your program check in form load for the existence of the specific version that you had on your development machine, but it would render the form useless if only a different version existed. Unless you need version specific functionality, I recommend instanciating hte control at runtime using the version generic ProgID.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform