Toll Free: (877) 723-1442 U.S. and Canada
Support
ActiveX / COM
Visual C++ / MFC
Customer Spotlight
Corporate Partners
Contact Sales

Call center available M-F 9:00 - 6:00 US Eastern Time.

U.S. and Canada
(877) 723-1442

International
(517) 625-5729

Email

Embedding License Information in Your Application

Author: Mike Palmatier
Posted: June 26, 2006
Environment: Visual Studio 6, 2002, 2003, 2005

There are some situations that you may need to include the content of the LIC file in your control using the License property. You DO NOT include the actual LIC file. For example, if you develop in C# you will need to include the license information, if you are developing an ActiveX control for Internet Explorer, you will need to include the license information, or if you are creating an ActiveX control that uses\included a Codejock component you will need to include the license information. There might be other situations where this is needed as well.

The License property is located in the GlobalSettings class for each control. The code below illustrates how to use the License property for each control used.

You will need to provide the correct Product Id and Validate Code. This information can be found in the LIC file. The LIC file is located in the same location as the OCX file. By default, the location of the OCX and LIC file is the "..\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006 Q2\bin" for the Xtreme Suite installation. This code should be included before any controls are creates, for example, in thee Form_Initialize event of the main form for Visual Basic 6.0. For simplicity, the code below demonstrates how to embed the license information for the CommandBars only, you will need to do this for each control you use.

Private Sub Form_Initialize()

 

    CommandBarsGlobalSettings.License = "CommandBars Control Copyright (c) " & _

    "2003-2006 Codejock Software" & vbCrLf & "PRODUCT-ID: " & _

    "Codejock.CommandBars.ActiveX.v10.20" & vbCrLf & _

    "VALIDATE-CODE: XXX-XXX-XXX-XXX"

 

End Sub

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Other products and/or company names may be trademarks or registered trademarks of their respective owners.