Hi,
Can anybody help me to do this in FWH. As per the write up in the CodeJock site, the property CommandBarsGlobalSettings.License should be set before the CommandBarControl is initialized. In VB this is done using the Private Sub Form_Initialize()
Writeup from the site with VB 6 SampleThe licence code should be included before any controls are created, for example, in the 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.
Visual Basic 6.0
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
C# SampleIn the constructor for your main form, place the following code BEFORE the call to the 'InitializeComponents' method.
// Create Instance of Global Settings Class for CommandBars
XtremeCommandBars.CommandBarsGlobalSettingsClass settings = new XtremeCommandBars.CommandBarsGlobalSettingsClass();
// Now enter the first three lines of your license file
// (Note carriage return line feed '\r\n' at the end of each line)
settings.License = "CommandBars Control Copyright (c) 2003-2004 Codejock Software\r\n" +
"PRODUCT-ID: XCB-ESD-ACTX-9500\r\n" +
"VALIDATE-CODE: XXX-XXX-XXX-XXX";
This same technique must also be used for any other Codejock ActiveX controls. It also appears that this step is only necessary on the main form of the application. I have other classes stored in DLL's that also use the Codejock controls, and I was not required to set the licenses individually for each one. I guess they truly are Global Settings
But in FWH how do we access the properties of an Activex control before the following code
- Code: Select all Expand view
oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.12.1.1", 0, 0, 0, 0 )
Or any idea when is this control getting initialised, do the above command Initialize the control
How do I execute the below given FWH code, before Initialising the controls ? That's where I am struck
- Code: Select all Expand view
oAct:SetProp("CommandBarsGlobalSettings.License", ;
"CommandBars Control Copyright (c) " + ;
"2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
"Codejock.CommandBars.ActiveX.v10.20" + CRLF +;
"VALIDATE-CODE: XXX-XXX-XXX-XXX"
I understand that, If you need to use CodeJock Controls in your FWH application and then distribute the application to your clients, then this process has to be done ie the Licence code should be hard coded in our FWH application.
Do Anybody here has used CodeJock control along with FWH and done the distributions to clients.
Regards
Anser