
Embedding licensed ActiveX Controls within a VB ActiveX Control
Quote:
> I am attempting to create an unlicensed Visual Basic
> ActiveX control which contains a third party ActiveX
> control which does use licensing. The problem is that
> Visual Basic does not seems to be encapsulating the
> licensing information correctly when I distribute my
> ActiveX control to a users machine (ie one without the
> third party control installed - rather my install simply
> copies and registers the ocx).
> The problem I am having is that if I use my control with a
> Visual Basic "form" application then use the for on the
> users machine then it works okay. But if I use it within a
> web page, then it won't work unless I use a license
> package file which contains the third party controls
> license key inside. The error message you get if it is not
> present is "You do not have an appropriate license to use
> this functionality".
> I guess what I would like to know is whether this is a bug
> with the third party control I am using or whether this is
> normal VB behaviour. In either case, is there a workaround.
This is normal behavior and there is no work-around....at least not a legal
one. Think about it. If all one had to do was encapsulate a custom control
requiring a license key within a UserControl that does NOT require a license
key, you're defeating the entire purpose of the constituent control having a
license key to begin with.
The reason you're not getting the error when your UserControl is placed on a
form is because you have the design-time license which VB automatically
checks. However, when your UserControl is used within a web page that is
opened in IE or whatever browser, it doesn't even check for the license
key's existance. (I think I explained that correctly.)
You should check the license agreement of the constituent control very
carefully. It may very well explicitly state that it cannot be used as a
constituent control in a UserControl of your own. This is something that
ultimately is up to the author of that control. For example, Microsoft
permits controls such as the TreeView and ListView (which require a license
key) to be used within a UserControl. All that is necessary for you to do
is add the license key to the Licenses collection.
There are a couple KB articles regarding this. Here's one:
INFO: Licensing Issues Related to User Controls Created with Visual Basic
http://support.microsoft.com/directory/article.asp
Mike