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
|