By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,501 Members | 1,678 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,501 IT Pros & Developers. It's quick & easy.

How to retrive Outlook 2003 style gradient color schemes?

P: n/a
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

Apr 4 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
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.
Apr 4 '06 #2

P: n/a
Hi,

http://channel9.msdn.com/ShowPost.as...ID=21712#21712

Ken
---------------
"Maximus" <Ma*****@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
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

Apr 4 '06 #3

P: n/a

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.as...ID=21712#21712

Ken
---------------
"Maximus" <Ma*****@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
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


Apr 4 '06 #4

P: n/a
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
"Maximus" <Ma*****@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
| 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
|
Apr 5 '06 #5

P: n/a
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...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Maximus" <Ma*****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
|
| 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.as...ID=21712#21712
| >
| > Ken
| > ---------------
| > "Maximus" <Ma*****@discussions.microsoft.com> wrote in message
| > news:2B**********************************@microsof t.com...
| > > 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
| > >
| >
| >
| >
Apr 6 '06 #6

P: n/a
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...

Apr 19 '06 #7

P: n/a
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

"Frank Rizzo" wrote:
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...

Apr 19 '06 #8

P: n/a
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

"Jay B. Harlow [MVP - Outlook]" wrote:
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
"Maximus" <Ma*****@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
| 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
|

Apr 19 '06 #9

P: n/a
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...
| >
Apr 19 '06 #10

P: n/a
I don't have the access to the code right now, but I'll try and post
tonight.
Maximus wrote:
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

"Frank Rizzo" wrote:
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...

Apr 19 '06 #11

P: n/a
Maximus,

I've posted the code on http://www.vbRad.com along with the description
of how I actually figured out the whole mess.

http://www.vbrad.com/article.aspx?id=102

Regards

Maximus wrote:
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

"Frank Rizzo" wrote:
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...

Apr 20 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.