How to retrive Outlook 2003 style gradient color schemes?

G

Guest

Hi all,

Has anyone been able to reterive the gradient selection colors used in
outlook 2003? Basically, I have a grid showing a list of records and my
client wants the selected row to have the same selection gradient back color
as Outlook 2003 has on its left pane. The selected pane in Outlook 2003 have
a gradient orange color for blue color scheme in XP. This gradient color
changes according to the color schemes of the windows XP. Can anyone tell me
how can I get the color schemes or combinations uesd in office 2003.

Thanks,
Maximus
 
J

Jonathan Rothwell

Maximus,
Has anyone been able to reterive the gradient selection colors used in
outlook 2003?

There is a property of MenuStrips, StatusStrips and ToolStrips, RenderMode,
that allows you to apply system-style or Office-style formatting to them.

Hope this helps.
 
G

Guest

Thanks all for your replies!

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.
And hence i am looking for a solution in VS 2003. I am sure this can be done
as som of the third party components seem to do this like divelements.

Please help and let me know a way to get the gradient selection colors used
in Outlook 2003 for an application build in VS 2003.

Thanks,
Maximus
 
J

Jay B. Harlow [MVP - Outlook]

Maximus,
Have you asked in an Outlook group?

To the best of my knowledge its an "implementation detail" that is buried
within Outlook that is not officially or unofficially documented.

However! Using a window capture tool (such as the PrtScn key) you should be
able to capture a bitmap image of the Outlook window, then paste that in
your favorite paint program & use one of its tools to see what the begin &
end color of the various pixels are (should only need two, maybe three
samples). The challenge might be coming up with the correct values for the
other properties for the gradient brush... I expect once you have the colors
& parameters its a simple matter of a linier gradient brush...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


| Hi all,
|
| Has anyone been able to reterive the gradient selection colors used in
| outlook 2003? Basically, I have a grid showing a list of records and my
| client wants the selected row to have the same selection gradient back
color
| as Outlook 2003 has on its left pane. The selected pane in Outlook 2003
have
| a gradient orange color for blue color scheme in XP. This gradient color
| changes according to the color schemes of the windows XP. Can anyone tell
me
| how can I get the color schemes or combinations uesd in office 2003.
|
| Thanks,
| Maximus
|
 
J

Jay B. Harlow [MVP - Outlook]

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.aspx?tabindex=4&tabid=49#Whidbey Beta 1

Unfortunately what the first "Outlook" sample hard codes the orange
highlight:

http://www.windowsforms.net/Samples/download.aspx?PageId=1&ItemId=222&tabindex=4

While the second "Outlook" samples appears to use a ToolStripButton to get
the highlight:
http://www.windowsforms.net/Samples/download.aspx?PageId=1&ItemId=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...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


|
| Thanks all for your replies!
|
| 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.
| And hence i am looking for a solution in VS 2003. I am sure this can be
done
| as som of the third party components seem to do this like divelements.
|
| Please help and let me know a way to get the gradient selection colors
used
| in Outlook 2003 for an application build in VS 2003.
|
| Thanks,
| Maximus
|
| "Ken Tucker [MVP]" wrote:
|
| > Hi,
| >
| > http://channel9.msdn.com/ShowPost.aspx?PostID=21712#21712
| >
| > Ken
| > ---------------
| > | > > Hi all,
| > >
| > > Has anyone been able to reterive the gradient selection colors used in
| > > outlook 2003? Basically, I have a grid showing a list of records and
my
| > > client wants the selected row to have the same selection gradient back
| > > color
| > > as Outlook 2003 has on its left pane. The selected pane in Outlook
2003
| > > have
| > > a gradient orange color for blue color scheme in XP. This gradient
color
| > > changes according to the color schemes of the windows XP. Can anyone
tell
| > > me
| > > how can I get the color schemes or combinations uesd in office 2003.
| > >
| > > Thanks,
| > > Maximus
| > >
| >
| >
| >
 
F

Frank Rizzo

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
 
G

Guest

Hello Frank,

It would be great if you can post the code of your usercontrol here as I
have still not found any answer to this problem.

Thanks,
Maximus
 
G

Guest

Hi Jay,

Nope, I haven't asked this question in an Outlook group.

As far as using PrtScr option, I have already tried but could not get the
exact look & feel of Outlook colors.

Any other ideas!

Thanks
Maximus
 
J

Jay B. Harlow [MVP - Outlook]

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


|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.aspx?tabindex=4&tabid=49#Whidbey Beta 1
| >
| > Unfortunately what the first "Outlook" sample hard codes the orange
| > highlight:
| >
| >
http://www.windowsforms.net/Samples/download.aspx?PageId=1&ItemId=222&tabindex=4
| >
| > While the second "Outlook" samples appears to use a ToolStripButton to
get
| > the highlight:
| >
http://www.windowsforms.net/Samples/download.aspx?PageId=1&ItemId=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...
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top