Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instantiating the Date / Time Picker at runtime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00368274
Message ID:
00368546
Vues:
28
>>>We have created a container that will instantiate the date/time picker control at run time. This is so that we don't bind a specific version of the control to our form.
>>>
>>>Anyway, a customer is running into an error "Appropriate license for class not found" when trying to create the control. After looking in the MS Knowledgebase, it says that you must have the design-time license to do this. However, I thought that anyone could create an instance of this control once it has been installed on your machine. I didn't think that there was a difference between "design-time" and "run-time" licenses for this control.
>>>
>>>We do this same thing with the Tree View and List View controls without a problem.
>>>
>>>Can anyone shed some light on this problem?
>>
>>Doug,
>>
>>Some ActiveX controls require that they physically be included a the form and be sub-classed that way. The Common Dialogs control is like this. At design time you could, for example, create a property to hold the reference in a command button, then in its init method instantiate the control, assigning it to the property. However, this won't work at run-time for the reasons you've encountered. It doesn't matter what gyrations you go through in your setup. Short of writing a C++ program to extract the license key from the control, it has to actually have a physical presence on a form somewhere in your project.
>
>George,
>
>That's what I was afraid of. Thanks for the info. Do you know how I can determine if an ActiveX control has this "feature"?

Doug,

Unfortunately, I don't. I did, however, locate an MS KB article that describes this. Hopefully, if you read "BUG: License Error with ActiveX Control Added at Run-Time" (Artcile ID: Q192693) it might provide some insight. While it only mentions the mscomctllib controls, I know it also applies to the Common Dialogs and MSComm control. The article does, however, provide the steps not only to reproduce, but it work around it as well.

hth,
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