Page 7 of 8

Re: Codejock RibbonBar first tests

PostPosted: Mon Apr 06, 2009 8:01 am
by Antonio Linares
There was a memory leak in Class TActiveX. It has been detected and fixed :-)

Next FWH build will include this fix.

In Class TActiveX this new Method has to be included:

Code: Select all  Expand view

    METHOD Destroy() INLINE ActXEnd( ::hActiveX ), Super:Destroy()          
 


And replace this module in FiveHCM.lib (Microsoft):
http://www.mediafire.com/?sharekey=414c ... 6e282a0ee8

Or this module in FiveHC.lib (Borland):
http://www.mediafire.com/?sharekey=414c ... 8114394287

Re: Codejock RibbonBar first tests

PostPosted: Mon Apr 06, 2009 8:05 am
by anserkk
Dear Mr.Antonio,

Are you using 12.1.1 or 13.0.0 ?

I am using 12.1.1 and is working fine on PC's If I run the CodeJock Setup. I have not tried Ver 13.0.0 and shall try

Regards

Anser

Re: Codejock RibbonBar first tests

PostPosted: Mon Apr 06, 2009 2:51 pm
by frose
Antonio,

<<I really want to know, how Lailton, Richard, or who else has discovered this know how

<You can inspect all properties, methods and events from Microsoft Word VBA: viewtopic.php?p=78087#p78087

Thank you for the tip, but IMO it's more efficient to use the Codejock help file!?

I was reflecting to the technic to catch the events of the RibbonBar, not the other things you can relative easily find in the documentation.

Here another question of this manner:
How can I handle the 'PaneClick' event which occurs when a StatusBarPane object on the StatusBar control is clicked.
Is it possible to adap the same technic as used for the RibbonBar events? If so, how?

Re: Codejock RibbonBar first tests

PostPosted: Wed Apr 08, 2009 10:20 am
by anserkk
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 Sample
The 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# Sample
In 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

Re: Codejock RibbonBar first tests

PostPosted: Thu Apr 16, 2009 7:22 am
by richard-service
Hi All,

This is a Ribbonbar+Calendar simple screen shot.

Image

Image

Please visit my Ribbonbar sample code and add these lines.

Code: Select all  Expand view

local oAct2

        oAct2 := TActiveX():New( oWnd, "Codejock.CalendarControl.12.1.1", 150, 0, 1000, 550 )
 



Richard

Re: Codejock RibbonBar first tests

PostPosted: Thu Apr 16, 2009 7:29 am
by Antonio Linares
Anser,

You may try:
Code: Select all  Expand view

oSettings = oAct:GetProp( "CommandBarsGlobalSettings" ) // it returns an OleAuto object

oSettings:License = "CommandBars Control Copyright (c) " + ;
    "2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
    "Codejock.CommandBars.ActiveX.v10.20" + CRLF +;
    "VALIDATE-CODE: XXX-XXX-XXX-XXX"
 

Re: Codejock RibbonBar first tests

PostPosted: Thu Apr 16, 2009 7:30 am
by Antonio Linares
Richard,

local oAct2

oAct2 := TActiveX():New( oWnd, "Codejock.CalendarControl.12.1.1", 150, 0, 1000, 550 )

Thanks :-)

Re: Codejock RibbonBar first tests

PostPosted: Fri Apr 17, 2009 5:39 pm
by Cgallegoa
Antonio,

oSettings = oAct:GetProp( "CommandBarsGlobalSettings" ) // it returns an OleAuto object


Doesn´'t work.

[errsysw.prg->ERRORDIALOG] (78) Called from:
errsysw.prg->(b)ERRORSYS(49)
win32ole.prg->TOLEAUTO:COMMANDBARSGLOBALSETTINGS(0)
->__OBJSENDMSG(0)
->ACTXGETPROPERTY(0)
.\source\classes\ACTIVEX.PRG->(b)TACTIVEX:TACTIVEX(0)
->TACTIVEX:GETPROP(0)
MSTMASIV.prg->MAIN(211)
Type: C >>>COMMANDBARSGLOBALSETTINGS<<<
Type: C >>>DISP_E_PARAMNOTOPTIONAL<<<
Type: N >>> 0<<<

Regards,

Carlos Gallego

Re: Codejock RibbonBar first tests

PostPosted: Fri Apr 17, 2009 9:27 pm
by Antonio Linares
Carlos,

This way we can access the GlobalSettings of the CommandBars:
Code: Select all  Expand view

   oSettings = oActiveX : GetProp( "GlobalSettings" )
   MsgInfo( oSettings:Version )
 

Re: Codejock RibbonBar first tests

PostPosted: Tue Apr 28, 2009 7:47 am
by anserkk
Hi,

Has anybody here used CodeJock in your FWH app. and distributed it in your client PC's. I still have not found a solution to activate the licence through code. ( For the time being, it is working, if I distribute the .lic license file along with the OCX control. Thanks to Mr.Natter) But using VB and other prog.lang we can access the members of the control even before the control is initialised. I don't know how to do that using FWH.

It appears that the problem I'm having is that you can't access the public members of CommandBars until after the control is fully initialized. Trying to access them before full initialization throws an error. However, when you finalize the control, it looks for the license. It appears I'm stuck! I can't set the license before initialization without throwing an error, and I can't initialize the control without a license.

Regards
Anser

Re: Codejock RibbonBar first tests

PostPosted: Wed Apr 29, 2009 11:21 am
by Loach
Hello!
Anser, may be it's not a good solution, but if in the begining of example "ribonbar.prg" insert this:
Code: Select all  Expand view

   oText := TTxtFile():New( "Codejock.CommandBars.v12.1.1.lic" )
   if oText:Open()
      oText:Add( "CommandBars Control Copyright (c) 2003-2008 Codejock Software" )
      oText:Add( "PRODUCT-ID: Codejock.CommandBars.ActiveX.v12.1" )
      oText:Add( "VALIDATE-CODE: XXX-XXX-XXX-XXX" )
      oText:Close()
   endif
 

and then after all controls defining
Code: Select all  Expand view

   ACTIVATE WINDOW oWnd ON init(ferase("Codejock.CommandBars.v12.1.1.lic"))
 

it seems, that everithing work fine...

Re: Codejock RibbonBar first tests

PostPosted: Wed Apr 29, 2009 1:08 pm
by anserkk
Mr.Sergey,

Thankyou for this bright idea. I think this is the only solution as of now. I don't know whether it is the limitation of Harbour/xHarbour

Regards
Anser

Re: Codejock RibbonBar first tests

PostPosted: Fri May 01, 2009 5:04 am
by RAMESHBABU
Hi Friends,

Has anybody tried Office2003 theme in Codejock ? If so, please guide me how to do it.

Thanks,

- Ramesh Babu P

Re: Codejock RibbonBar first tests

PostPosted: Fri May 08, 2009 10:16 am
by Sakis
To have acess to the CommandBarsGlobalSettings on Form Initialize Event add the following code:
Code: Select all  Expand view


    LOCAL GLOBALSettings:= NIL
      GlobalSettings:= CreateObject("Codejock.CommandbarsGlobalSettings.13.0.0")
       WiTH OBJECT GlobalSettings
          :License:= "CommandBars Control Copyright (c) " + ;
          "2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
          "XCB-ESD-ACTX-9600" + CRLF + "VALIDATE-CODE: XXX-XXX-XXX-XXX"
       END WITH
 

You will need to provide the correct Product Id and Validate Code. This information can be found in the LIC file.
This code must be added BEFORE OBJECT INITIALIZATION

:lol: Best Regards
Dionisis

Re: Codejock RibbonBar first tests

PostPosted: Sat May 09, 2009 5:29 am
by anserkk
Mr.Dionisis,

Thank you very much. It is working perfectly.

Regards

Anser