Getting over the licensing problem is the main stay if we are distributing our application or using it on our end as well.
Licensing can be design time and run time licensing. Design-time licensing is verified by control containers such as Microsoft Visual Basic, Microsoft Access, or Microsoft Visual InterDev. Before these containers allow a developer to place a control on a form or Web page, they first verify that the control is licensed by the developer or content creator. These containers verify that a control is licensed by calling certain functions in the control: If the license is verified, the developer can add it. Run-time licensing is also an issue for these containers (which are sometimes bundled as part of the final application); the containers again call functions in the control to validate the license that was embedded at design time. The blog discusses troubleshooting steps in scenarios where you may get nag screens indicating that there is some problem with the licensing of control in the current machine or application.
This screen shows that you can use the control for 30 days as trial. The concept of trial indicates that within 30 day time period you would get this nag screen once in a day. After 30 days time span is over, you would get this nag screen every time you open/run the application. In case of using a trial version you may continue using the control even after the 30 day time period is over, even though the screen would now show you that " You trial version has expired". However apart from getting the nag screen all the features and functionality of the control would be available to you. If you wish to continue using the product, you will need to purchase a license.
License Nag Screen after Purchasing the License
The license might not be properly activated while installation of the Studio in this scenario you may try the following:
- Click on the LICENSE button on the screen
- Enter your information like Name, Company and Serial Number
- Click OK to activate and receive the corresponding message showcasing the license being activated
- Restart your project to check for the same.
Nag Screen Showcasing the License Expired
Sometime the nag screen shows that the license expired in a specific year and build like "License expired in 2003-Q4". In this case you need to check your serial key and the build number showing in the license screen, it indicates that the build registered on your machine is not appropriate with the license key used for activation. A license say for e.g. VSFlexgrid (1240200-A8-xxxxxx) is valid for releases between 2002.Q4 to 2003.Q3. So if you you are using the installer flex8_Q0403.exe (which is 2003.Q4 release), the mentioned key will not work. Hence you have to make sure that the build used is correct with the serial key you have.
Nag Screen Despite License properly Activated
Sometimes the project shows a nag screen with a message that "This dialog box will not be shown if you recompile the program using licensed version of the product" This can be due to different build of the same control, which can be due to
- Different build installed and registered on the machine
- Any other 3rd party software using the same control with a different build
Hence, if a 3rd party application is using a different build than the one installed on your machine, then you need to either ask your vendor to give you the application with the same build as on your machine or you need to get that specific build licensed and registered on your machine as the one used in the 3rd party application. Otherwise you need to check for the duplicate build on the machine and manually un-register and delete it. If the nag is coming for VSFlexGrid 8.0(Unicode/Light)
- Look for vsflex8u.ocx files on the machine [Or the exact file name can be found here]
- Unregister them by using regsvr32 -u vsflex8u.ocx and delete it.
License Nag on Client Machine
If you get nag screen on the client machine, then please check if the package is created correctly. The ocx and dll files carries the license information to client machine. So if you are getting nag screen, then these ocx and dll files does not have proper information for license on development machine, or they are not placed in the System32 folder. Ensure that ocx/dll files for ActiveX control is in System32 folder and licensed properly. Then create a new package and ensure that you are including the ocx/dll files in the package. You may also try the same on a clean test machine to see if that works fine as in that case problem can be with duplicate builds of the same control on client end which can be resolved using the solutions above.
Working with Visual Studio.NET platform
Usually the ActiveX runtime license appears to be added to the resources of the form to which it is added. Specifically, it is embedded somewhere in the Form.resx file, and is marked as OcxState for the control. This contains properties and apparently the license. There can be few issues related to functionality and licensing as the platform is totally different as well as the licensing mechanism used in .NET. Also, you may just delete the OcxState property in the Form.resX file and then rebuild the project. It would recreate the Form.resX-file and, when you would run it, the license warning gets removed.
Licensing issues in VC++/MFC applications
For C++/MFC application/projects the licensing information is embedded in the dialog resources for each dialog that contains a ActiveX control. The sample programs have no specific licensing data, so the licensing data needs to be refreshed from the installed licensed version. To fix this:
- In each dialog that contains a ActiveX control, use Visual Studio resource file editor to delete the existing control, then choose “Insert ActiveX Control…” from the dialog editor context menu, and choose the ActiveX version you need.
- Size and place the control to match the position of the old version that you deleted, and rebuild your project.
- The license “nag” should no longer appear when running the program.
Dynamically Adding the Controls
If the controls are added dynamically then you need to embed their license before re-distributing the application. Our blog post explains how to embed license. Following KB articles can also be referred : VB 6.0-:http://our.componentone.com/2011/03/04/embedding-license-key-for-activex-controls-created-at-run-time Visual C# or VB.NET-: http://support.microsoft.com/kb/326652 & http://support.microsoft.com/kb/326651 VC++-: http://support.microsoft.com/kb/151804 & http://support.microsoft.com/kb/151771
Web Deployment & Adding license
You need to recreate the LPK file using the LPK_Tool. Please make sure that the reference of ActiveX control which you are using to create the .LPK file has the same version and type (Light, Unicode, OLE etc.) as the control (say VSFlexGrid .OCX for e.g) used in the application and .CAB file. In the code, please make sure that you set the CLASSID "5220cb21-c88d-11cf-b347-00aa00a28331" along with VIEWASTEXT tag, for the License Manager and use relative paths to LPK file. Please refer the following link for more information:
<OBJECT CLASSID = "clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT> <PARAM VALUE="relative URL to .LPK file"> </OBJECT>
You may refer the following link, which has detailed information on how to add the C1 Chart/VSFlex Grid as the process is same for both, the steps for web deployment of the VS FlexGrid control will also be similar. http://helpcentral.componentone.com/nethelp/chart83d/default.htm#!Documents/addingacomponentonec.htm Location of CAB files on your computer say for e.g VSFlexGrid would be: C:\Program Files\ComponentOne Studio\VS FlexGrid Pro 8.0\cabs or as per the new build installed: C:\Program Files\ComponentOne\Studio for ActiveX
If the problem persists still then you may remove the licenses on your machine for ActiveX by downloading the utility from the link give below: http://helpcentral.componentone.com/C1KB/Upload/C1LicBomb.zip And add the licenses again or activate them by using the LICENSE button that would be coming on the nag screen or uninstalling and re-installing the Studio For ActiveX. If you still face the problems then you may either email us at **email@example.com_** or post your query on our forums: http://our.componentone.com/groups/