Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiating the Date / Time Picker at runtime
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00368274
Message ID:
00368537
Views:
23
>>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 Stalter

"According to the proverb, the best things are the most difficult." -Plutarch
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform