Print Page | Close Window

Get theme Color from DLL

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=16274
Printed Date: 02 December 2024 at 4:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Get theme Color from DLL
Posted By: gibra
Subject: Get theme Color from DLL
Date Posted: 25 February 2010 at 6:35am
Scenario:
VB2008 SP1 - Windows XP SP3
 
my form use a Ribbonbar, like RibbonSample.sln sample project shipped in SuitePro 13.2.1,
where I can change different Styles loading the appropriate library:
Office2007Black.dll, Office2007Aqua.dll, ...
 
I load the library using appropriate statement, example:
 
CommandBarsGlobalSettings.Office2007Images = IO.Path.GetDirectoryName(Application.ExecutablePath) + " file://\\..\\Styles\\Office2007Aqua.dll - \\..\\Styles\\Office2007Aqua.dll "
All work fine.
 
Now, what i would is to know how to get the colors (and images) from the current DLL loaded.
I know that DLL contains this info, then I have try to search if CommandBar control contains methods or properties to get them, but I not found nothing to help me.
Please note that I DON'T want change any colors or images in library!!!
I want simply retrieve colors (and images).
 
The goal is to use this settings to apply colors and images to other form.
I already know that I can apply theme style to other forms using the below statement:
 
CommandBars.EnableOffice2007FrameHandle(MyForm.Handle.ToInt32())
 
this change only the form border aspect, but doesn't change any other color. I.e. form BackColor, ForeColor still uses the System colors.
Also, when I use a PushButton with Appearance = 6 (xtpAppearanceOffice2007) when I apply the theme Office2007Black to the form, the PushButton still to use Office2007Blue theme, of course. I would be able to reflect the Black theme instead of Blue theme.
 
Briefly, I would achieve same results using the SkinControl which use .cjstyles. 
 
Anyone can help me about?
 
Thank!
 
 


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8



Replies:
Posted By: tjsivies
Date Posted: 02 March 2010 at 12:08am
I too would like to be able to determine which set of colors are selected when the ribbon loads. This way I can show the user  by checking a button the color that is selected. I note that this is not done in the sample projects.

Also where are the setting kept? In the registry? If so where?

Thx

Trevor

Product: Xtreme SuitePro (ActiveX) version 13.3.0 
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0 SP6


Posted By: gibra
Date Posted: 10 March 2010 at 5:05pm
OK, after some test seem that the only way is to use together DLL library + SkinFramework (which use *.cjstyle libraries).
 
If you need help, I can make a sample project.
Let me know.


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8



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