Frank,
Quickly looking at System.Windows.Forms.ProfessionalColors (.NET 2.0) with
Reflector I got that impression. That they are based partially on the Theme
with some possibly being hard coded.
However I did not dig that deep yet...
| > If you look at the VS 2005 MenuStrip & ToolStrip controls you may notice
| > that they use the same "orange" "highlight". Don't hard code "orange" as
the
| > first example did.
I would expect the VS 2005 (.NET 2.0) MenuStrip & ToolStrip to get their
colors from ProfessionalColors, however I have not dug that deep...
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Frank Rizzo" <no****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
|I don't know if the parties are still interested in the solution, but I
| had the same problem (e.g. had to come up with user control that matched
| outlook 2003 and would change based on the theme) and after extensive
| research came up with the following:
|
| 1. The outlook gradient colors (e.g. TitleBar) do NOT come from the
| theming API (e.g. uxtheme.dll)
|
| 2. The colors are internal to Office 2003 and are hardwired based on
| the 3 well-known xp (silver, blue, etc...).
|
| 3. I've implemented a user control and I can post the code (if anyone
| still needs it).
|
| Regards
|
|
|
|
| Jay B. Harlow [MVP - Outlook] wrote:
| > Maximus,
| > Looking at the site the Ken gave, along with consulting with some fellow
| > Outlook MVPs it appears the colors that Outlook uses comes from the
Windows
| > Theming APIs. .NET 2.0 (VS 2005) makes leveraging the Theming APIs super
| > easy (as the examples that Ken gave show).
| >
| >
http://www.windowsforms.net/Default....bey%20Beta%201
| >
| > Unfortunately what the first "Outlook" sample hard codes the orange
| > highlight:
| >
| >
http://www.windowsforms.net/Samples/...222&tabindex=4
| >
| > While the second "Outlook" samples appears to use a ToolStripButton to
get
| > the highlight:
| >
http://www.windowsforms.net/Samples/...203&tabindex=4
| >
| > If you look at the VS 2005 MenuStrip & ToolStrip controls you may notice
| > that they use the same "orange" "highlight". Don't hard code "orange" as
the
| > first example did. As it (changes for example under the 3 Windows XP
themes
| > it is an "orange" color, however under the Table PC - Enegry Blue theme
its
| > a "bluish" color. Both Office 2003 & VS 2005 use either "orange" or
"bluish"
| > based on the XP theme selected, as does this second example.
| >
| > It appears that the second sample leverages the VS 2005 MenuStrip &
| > ToolStrip for each of the navigation pane buttons.
| >
| > I'm still looking: I would expect one of the
| > System.Windows.Forms.VisualStyles elements to give you this orange/blue
| > highlight color, however its a matter of finding which one. Then once
you
| > find it there, its a matter of backing into the respective Win32 Theme
API
| > to get it. Once you have the Win32 Theme API info, you should be able to
| > then call into the Theme API from VS 2003...
| >
| > | But the unfortunate part is that I am using VS 2003 and hence the
solution
| > | you provided won't work. My client is not yet ready to convert it to
VS
| > 2005.
| > IMHO this is an oppurtunity to put on your marketing hat & convince your
| > client to upgrade to VS 2005 as getting the gradient is (should be)
super
| > easy, while doing it is VS 2003 is still doable, but will cost them
| > significantly more as you need to write a substantial part of what VS
2005
| > gives you for "free". This is not even addressing all the other more
general
| > producivity gains in VS 2005.
| >
| > As I stated I'm still researching, where the color is coming form...
| >