Codejock RibbonBar first tests

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post 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

    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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post 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
User avatar
frose
Posts: 327
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Gütersloh
Contact:

Re: Codejock RibbonBar first tests

Post 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?
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post 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

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

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
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Codejock RibbonBar first tests

Post 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

local oAct2

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

Richard
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post by Antonio Linares »

Anser,

You may try:

Code: Select all

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"
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post by Antonio Linares »

Richard,
local oAct2

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

Antonio Linares
www.fivetechsoft.com
Cgallegoa
Posts: 335
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador
Contact:

Re: Codejock RibbonBar first tests

Post 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
Saludos,

Carlos Gallego

*** FWH-20.07, xHarbour 1.2.3 Build 20190603, Borland C++7.30, PellesC ***
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post by Antonio Linares »

Carlos,

This way we can access the GlobalSettings of the CommandBars:

Code: Select all

   oSettings = oActiveX : GetProp( "GlobalSettings" )
   MsgInfo( oSettings:Version )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post 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
Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Codejock RibbonBar first tests

Post 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

   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

   ACTIVATE WINDOW oWnd ON init(ferase("Codejock.CommandBars.v12.1.1.lic"))
 
it seems, that everithing work fine...
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post 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
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Codejock RibbonBar first tests

Post by RAMESHBABU »

Hi Friends,

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

Thanks,

- Ramesh Babu P
User avatar
Sakis
Posts: 41
Joined: Fri Oct 21, 2005 2:12 pm
Location: Athens

Re: Codejock RibbonBar first tests

Post by Sakis »

To have acess to the CommandBarsGlobalSettings on Form Initialize Event add the following code:

Code: Select all


    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
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post by anserkk »

Mr.Dionisis,

Thank you very much. It is working perfectly.

Regards

Anser
Post Reply