Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Load Dinamically CommandBars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Load Dinamically CommandBars

 Post Reply Post Reply
Author
Message
aldog@imaginesoft.co View Drop Down
Newbie
Newbie


Joined: 09 March 2016
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote aldog@imaginesoft.co Quote  Post ReplyReply Direct Link To This Post Topic: Load Dinamically CommandBars
    Posted: 09 March 2016 at 12:45pm
Hi everyone,


I'm trying to dynamically load the CommandBars control. For this I used the same example that comes with version 17, I removed the controls at design time, and then instantiate at runtime with:

Set CommandBars = Me.Controls.Add("Codejock.CommandBars.17.1.0", "CommandBars")

The problem is that dynamically loading background images are not loaded

What am I doing wrong?
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2016 at 3:20am
Hello aldog,

I suppose you forgot to load  VisualStudio2015.dll before setting theme VisualStudio2015 (or other DLL for other theme)

  CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\VisualStudio2015.dll", "VisualStudio2015Blue.ini"
  CommandBars.VisualTheme = xtpThemeVisualStudio2015


You can explore our sample
c:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v17.1.0\Samples\CommandBars\VB\RibbonSample
to see how set different themes in v17.1.

In file frmMain.frm look for methods CreateRibbonBar, SetStyle, SetCommandbarsTheme and other.

Regards,
  Oleksandr Lebed
Back to Top
aldog@imaginesoft.co View Drop Down
Newbie
Newbie


Joined: 09 March 2016
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote aldog@imaginesoft.co Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2016 at 2:46pm
Hi olebed, thanks for answering Smile
I did what you say but still the same:

Back to Top
aldog@imaginesoft.co View Drop Down
Newbie
Newbie


Joined: 09 March 2016
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote aldog@imaginesoft.co Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2016 at 3:04pm
I've gotten it to work, but the object does not assume the skin

 Set CommandBars = Me.Controls.Add("Codejock.CommandBars.17.1.0", "CommandBars")

            
    LoadIcons
    CreateActions
    CreateRibbonBar
    
    FontSizes(0) = 0
    FontSizes(1) = 11
    FontSizes(2) = 13
    FontSizes(3) = 16
    
    
CommandBarsGlobalSettings.ResourceImages.LoadFromFile "C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v17.1.0 (30 Day Trial)" & _
                                                    "\Samples\Styles\VisualStudio2015.dll", "VisualStudio2015Blue.ini"
CommandBars.VisualTheme = xtpThemeVisualStudio2015


SetCommandbarsTheme xtpThemeOffice2013, App.Path & "\..\..\..\Styles\VisualStudio2015.dll", "VisualStudio2015.ini"
ControlFile.Style = xtpButtonCaption

'CreateBackstageView
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout



Dynamically load:



Design time load

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2016 at 4:11pm
SetCommandbarsTheme xtpThemeOffice2013, App.Path & "\..\..\..\Styles\VisualStudio2015.dll", "VisualStudio2015.ini"
SetCommandbarsTheme xtpThemeVisualStudio2015, App.Path & "\..\..\..\Styles\VisualStudio2015.dll", "VisualStudio2015.ini"


Also skins and themes are different technologies which have problems with compatibility.

Screenshot under "Dynamically load:"  - looks like Dark Gray Office2013 theme from file Office2013WordDarkGray.ini
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.