Link to home
Create AccountLog in
Avatar of thehow11
thehow11Flag for United States of America

asked on

VB6 ActiveX control when inserted into VB6 displays license error

EE-

  I have a VisualBasic 6.0 activex control that I inherited.  When That activeX is inserted into a new vb project I get the error:
"License information for this component not found.  You do not have an appropriate license for this functionality in the design environment"

Is there a way to determine which "component" it is referring to?  I suspect it is MSFlexgrid but I'm not 100% sure.  Here are the components I am using:

Microsoft Common Dialog Control 6.0
Microsoft FlexGrid Control 6.0
Microsoft Windows Common Controls 6.0 (SP6)
Microsoft Windows Common Controls 2.6 (SP4)

There is a previous version of my activeX that works but I don't have that project unfortunately.  I can place the older ActiveX into my installed directory and I don't see that error (it works correctly).

Any help would be appreciated.

Thanks,

--GSH
Avatar of shorvath
shorvath
Flag of Canada image

Try inserting one control at a time in a new project to see which one gives the error.
Assuming it doesn't happen unless you use the inherited control, it seems that It must be that control. BTW in case you're new at this game, VB refers to controls as components.
Avatar of thehow11

ASKER

Team-

  Thanks for your responses.  My OCX is definitely the culprit - I need to find out what about my OCX is causing it to have that error message when it is placed into a container (e.g. VB6 exe project.)

  I tried to create a new OCX with the various controls (components) that I mentioned above but that all worked when I inserted that test OCX into a new VB6 exe project).

So I will try the microsoft knowledgebase article 177799 as suggested and will let you know.

Thanks,

--GSH
Team-

  Ok, I've tried everything that the kb article (177799) talked about including reinstalling VB6.  I still have the issue.  I'm out of ideas as to what I can do.  Any additional help would be appreciated.

Thanks,

--GSH
Try this first to see if the problem is a VB control used inside you ocx.

http://support.microsoft.com/kb/194751

If its not a VB control causing the problem them perhaps the control itself was created with the "Require License" option checked when the control was created.  If that was the case then you must find a file called YourOCXname.lic and put it into the same folder as the .ocx file.    If you don't have the .lic and you don't have the source code your only option is to rebuild the control from scratch.
From the VB6 Help screen (General Tab (Project Properties Dialog Box))


Require License Key

Enables licensing for ActiveX Control projects (projects that compile to .ocx files), not to .exe or .dll files. A Visual Basic license file (*.vbl) will be created when you build the project. The *.vbl must be registered on the user’s machine for the components to be used in the design environment. The SetUp Wizard will build a setup program that properly registers the information in the *.vbl file on the end user's machine when that setup program is run.
One last thing..  If you don't need to make any changes to the Control itself, you could try to load it at runtime.  Controls (including custom OCX's) can be loaded, positioned, hidden etc. dynamically during the execution of your code.

http://www.vb-helper.com/howto_add_activex_control.html
Team-

  Thanks again for your suggestions.  I do have the source code - and the project doesn't have the "requires licence key" checked so that can't be it.

  I've tried the kb194751 and no luck.

  I can try the runtime load - but unfortunately, I has to eventually work as a design time load because my company sells it that way (loads into an HMI).

  I have 2 pieces of information that may be useful.

  1. I have an older copy of the OCX that works - unfortunately, I don't have the corresponding source code for the working version.

  2. I've download and tried using Test Container which can't load it as well.  The error the test container gives is: Failed to create control.  Unspecified Error.

I'm not liking the Unspecified error - sounds like a catch-all error.

Is it possible the VB error about license not found is misleading?

Is there a way to look to see how each control (The current bad control and the old working control) loads into vb/test container?

I've looked at dependancy walker for both of these and it APPEARS to be the same (except where dlls and such have their base addresses.)

Again, I really appreaciate your help.

Thanks,

--GSH
ASKER CERTIFIED SOLUTION
Avatar of shorvath
shorvath
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
This (making a copy and renaming it) worked and lead me to my solution.  Thank-you very much!  I appreciate you guys all hanging in there with me and not giving up.