Contact Sales

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

Case Studies

E.d. Soft

E.d. Soft selected Suite Pro with Visual Basic over many other...

Embedding License Information in Your Application

Author: Mike Palmatier
Posted: June 26, 2008
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\Suite Pro ActiveX 2006 Q2\bin" for the Suite Pro 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 & _



End Sub