Print Page | Close Window

Ribbon frame theme dissapear

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=10211
Printed Date: 18 April 2024 at 1:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon frame theme dissapear
Posted By: WaleedSeada
Subject: Ribbon frame theme dissapear
Date Posted: 13 April 2008 at 5:31am
Hello All,
 
I was using commandbar ver: 10.4 and also the skinframework to develop a main window for our application.
 
I install commandbars ver: 11.2.2 and I upgrade the application and few things appear.
 
The window ribbon frame dissaper whenever a dialog open (response dialog), or even when the ribbon loas focus.
 
I didn't express this in the examples installed.
What could be the problem .... ?!
 
Best regards,
 
 
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada



Replies:
Posted By: WaleedSeada
Date Posted: 13 April 2008 at 1:26pm
https://forum.codejock.com/uploads/20080413_132457_Test_Commandbar.zip -
Hello All,
 
here is an example:
 
uploads/20080413_132457_Test_Commandbar.zip
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: Oleg
Date Posted: 14 April 2008 at 12:50am
Hello, Works for me. :(
 
Try to add
SkinFramework1.RemoveWindow me.hWnd


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: WaleedSeada
Date Posted: 14 April 2008 at 3:13am
Hello Oleg,
 
I can't see why it doesn't work for me.
 
SkinFramework1.RemoveWindow me.hWnd didn't work either :(
 
Regards,
 
/edit
How is it working, did you change any of the code, it doesn't work on any other PC as well...
 
Regards,
 
/edit
I just want to mention that I am using the unicode dll.
 
regards,


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: Oleg
Date Posted: 14 April 2008 at 4:03am

Hi,

Please send screenshot to mailto:support@codejock.com - support@codejock.com


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: younicke
Date Posted: 14 April 2008 at 6:01am
Originally posted by WaleedSeada WaleedSeada wrote:

https://forum.codejock.com/uploads/20080413_132457_Test_Commandbar.zip -



you enabled the themeframe and then you again set another caption. when put the ribbonform.caption statement before calling enableframetheme, it worked. you could try this and tell me what happened.

    ' Ribbon Settings
    ' =====================================
    RibbonForm.Caption = "Ribbon Issue"
    RibbonBar.EnableFrameTheme
    CommandBars.EnableOffice2007Frame True





Posted By: WaleedSeada
Date Posted: 15 April 2008 at 3:53am
it is working no kidding
 
You make my day ....
 
Best regards,
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: RedFin
Date Posted: 16 April 2008 at 10:38pm
In this https://forum.codejock.com/forum_posts.asp?TID=10206&PID=33789#33789 - forum post JantjeKeizer provided the tip to use the SetWindowText API.

Can use it at any time and so far I haven't had any more problems with the ribbon bar theme.


Posted By: WaleedSeada
Date Posted: 17 April 2008 at 7:45am
Can you post the definition of that API, please so I can test it
 
Best regards,
 
/Edit
Works like charm ....
 
Best,
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: WaleedSeada
Date Posted: 17 April 2008 at 7:53am
Hello,
 
Did you ever face a problem with skinframework, it cause the application to close on some PC's, Have you ever face somthing like that.
 
Best regards,
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: RedFin
Date Posted: 17 April 2008 at 7:57am
For anyone interested, the declaration is ...

Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long


Posted By: RedFin
Date Posted: 17 April 2008 at 5:07pm
Sorry to say, but I haven't tried the Skin Framework yet.

However, I do get the occassional crash in the VB6 IDE since using the CodeJock control suite. Initially it was happening every 10 min or so. My solution was -

1. removed my use of WinXP Visual style for the VB constituent controls (not needed anyway now that I have the codejock suite)
2. re-applied VB6 SP6
3. found out that the CodeJock tree control causes a crash if you use the .Clear method (which I was using, and obviously don't anymore)

Since doing those things, my crashes have become very infrequent and I wouldn't be surprised if there's something on my PC contributing.

But this is all talking about the develoment PC. I'm still in development of my software and haven't yet done any extended testing on other PCs.

Rohan


Posted By: WaleedSeada
Date Posted: 19 April 2008 at 4:49am

Hello Rohan,

 

I have only this problem on some PC's, and I trace the problem and found that this line causes the problem:

SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBlue.ini"

 

I add this line after I enable the theme for the ribbon bar here is the last script of the function, just to get the whole picture:

 

    SetWindowText Me.hwnd, App_title(Language)
    RibbonBar.EnableFrameTheme
    CommandBars.EnableOffice2007Frame True
       
    'Cause problem on some machines
   
'SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBlue.ini"
    'SkinFramework1.ApplyWindow Me.hwnd
    'SkinFramework1.ApplyOptions = SkinFramework1.ApplyOptions Or xtpSkinApplyMetrics

    SetFont
    CommandBars.PaintManager.RefreshMetrics
    CommandBars.RecalcLayout
    picClient.Refresh
    'yes twice, I know ... leave it like this ... okay
    SetFont
   
    RibbonBar.ControlQuickAccess.Visible = False
    RibbonBar.ControlQuickAccess.CloseSubMenuOnClick = True

 

The strange thing is that; I make available to the end-user to change the theme by putting the same code in the execute event of the ribbon bar and I use the same line of code, but the application doesn't crash when this line executed and the theme changes

Here is the script:

 

        Case ID_OPTIONS_STYLEBLACK:
            CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Black.dll"
            SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBLACK.ini"
            CommandBars.PaintManager.RefreshMetrics
            CommandBars.RecalcLayout
            picClient.Refresh
        Case ID_OPTIONS_STYLEBLUE:
            CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Blue.dll"
            SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBLUE.ini"
            CommandBars.PaintManager.RefreshMetrics
            CommandBars.RecalcLayout
            picClient.Refresh
        Case ID_OPTIONS_STYLESILVER:
            CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Silver.dll"
            SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalSilver.ini"
            CommandBars.PaintManager.RefreshMetrics
            CommandBars.RecalcLayout
            picClient.Refresh

 

Could be the flow and the order of the commands I have...!!

Best regards,



-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: RedFin
Date Posted: 19 April 2008 at 5:38pm
Hi Waleed,

I really have to say that I'm still just a beginner when it comes to programming, and as I said above I haven't even tried the SkinFramework yet :-|

The only thing I can offer, and I really have no idea whether it should make a difference or not (eg. I don't know which programming language you are using, but the syntax looks like VB), but you are using a "+" as your concatentation operator ... should you be using "&" (which I notice you are using in the other parts of the code)??? ie....

     SkinFramework1.LoadSkin App.Path & "\Styles\Vista.cjstyles", "NormalBlue.ini"

Just a thought. As I say, I'm no expert really, but I have fallen foul of little things like that in the past.


Regards,

Rohan


Posted By: WaleedSeada
Date Posted: 20 April 2008 at 3:58am
Thanks Rohan for your reply
 
Best regards,
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: evidica
Date Posted: 31 March 2009 at 9:57am
Originally posted by WaleedSeada WaleedSeada wrote:

    SetWindowText Me.hwnd, App_title(Language)
    RibbonBar.EnableFrameTheme
    CommandBars.EnableOffice2007Frame True
       
    'Cause problem on some machines
    'SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBlue.ini"
    'SkinFramework1.ApplyWindow Me.hwnd
    'SkinFramework1.ApplyOptions = SkinFramework1.ApplyOptions Or xtpSkinApplyMetrics
    SetFont
    CommandBars.PaintManager.RefreshMetrics
    CommandBars.RecalcLayout
    picClient.Refresh
    'yes twice, I know ... leave it like this ... okay
    SetFont
    
    RibbonBar.ControlQuickAccess.Visible = False
    RibbonBar.ControlQuickAccess.CloseSubMenuOnClick = True

The strange thing is that; I make available to the end-user to change the theme by putting the same code in the execute event of the ribbon bar and I use the same line of code, but the application doesn't crash when this line executed and the theme changes
Here is the script:

        Case ID_OPTIONS_STYLEBLACK:
            CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Black.dll"
            SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBLACK.ini"
            CommandBars.PaintManager.RefreshMetrics
            CommandBars.RecalcLayout
            picClient.Refresh
        Case ID_OPTIONS_STYLEBLUE:
            CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Blue.dll"
            SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalBLUE.ini"
            CommandBars.PaintManager.RefreshMetrics
            CommandBars.RecalcLayout
            picClient.Refresh
        Case ID_OPTIONS_STYLESILVER:
            CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Silver.dll"
            SkinFramework1.LoadSkin App.Path + "\Styles\Vista.cjstyles", "NormalSilver.ini"
            CommandBars.PaintManager.RefreshMetrics
            CommandBars.RecalcLayout
            picClient.Refresh


Anyone have a C# example for this?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net