Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveX question?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00238864
Message ID:
00239031
Vues:
18
>>>Just wondering if any one know if there is a way to determine the version# of an activeX control programatically in VFP. i.e. I want to find out the version# of the calendar control at run time...
>>>
>>>Any help is appreciated !!!
>>>
>>>Thanks.
>>
>>If you know the name and location of the OCX file, all you have to do is pass it, along with an array to AGETFILEVERSION() (or GetFileVersion() in foxtools for VFP 5.0). The fourth array element will contain the version.
>
>George, that's great where you're certain that you're pointed to the right .OCX, but because of the 'last man standing wins' approach to registration, it's safer to look in the registry - your original OCX may be present on the system, but another app may have registered a different version in a different directory, or with a different file name, that usurps the ProgID and CLSID registry keys that are used to determine which control instance is being loaded. If you're working with a VersionIndependentProgID (ie Visual.FoxPro.Application, as opposed to the version-specific ProgIDs VisualFoxPro.Application.5 and VisualFoxPro.Application.6) it's even more likely that you're going to get bitten by looking at the OCX...

Hi Ed,

Very true, but I think that it's more of a reason to sub-class the control.
George

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

Click here to load this message in the networking platform