473,409 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Color theme of toolstrip and menustrip

I'm wondering if there is a easy way to change for example toolstrips
appearance. I'd like to have the same theme as in VB2005. Brown backgroung
instead of the light blue. Can this be done without creating own custom draw
procedure?

Somehow the theme of Visual Studio looks more professional than the original
blue color.

-Teemu

Jan 4 '06 #1
4 24684
Hi,

You can change the color scheme by creating a new ProfessionColorTable.
Then tell the toolstrip renderer to use the new color table. I created a
color table based on the c# code found here.

http://blogs.msdn.com/jfoscoding/articles/489637.aspx

To changing the color scheme of the renderer

ToolStrip1.Renderer = New ToolStripProfessionalRenderer(New TanColorScheme)

Here is the code for the professionalcolortable

Public Class TanColorScheme
Inherits ProfessionalColorTable

Public Overrides ReadOnly Property ButtonCheckedGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property ButtonCheckedGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property ButtonCheckedGradientMiddle() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property ButtonPressedBorder() As
System.Drawing.Color
Get
Return Color.FromArgb(&H31, &H6A, &HC5)
End Get
End Property

Public Overrides ReadOnly Property ButtonPressedGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&H98, &HB5, &HE2)
End Get
End Property

Public Overrides ReadOnly Property ButtonPressedGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&H98, &HB5, &HE2)
End Get
End Property

Public Overrides ReadOnly Property ButtonPressedGradientMiddle() As
System.Drawing.Color
Get
Return Color.FromArgb(&H98, &HB5, &HE2)
End Get
End Property

Public Overrides ReadOnly Property ButtonSelectedBorder() As
System.Drawing.Color
Get
Return MyBase.ButtonSelectedBorder
End Get
End Property

Public Overrides ReadOnly Property ButtonSelectedGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property ButtonSelectedGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property ButtonSelectedGradientMiddle() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property CheckBackground() As
System.Drawing.Color
Get
Return Color.FromArgb(&HE1, 230, &HE8)
End Get
End Property

Public Overrides ReadOnly Property CheckPressedBackground() As
System.Drawing.Color
Get
Return Color.FromArgb(&H31, &H6A, &HC5)
End Get
End Property

Public Overrides ReadOnly Property CheckSelectedBackground() As
System.Drawing.Color
Get
Return Color.FromArgb(&H31, &H6A, &HC5)
End Get
End Property

Public Overrides ReadOnly Property GripDark() As System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 190, &HB3)
End Get
End Property

Public Overrides ReadOnly Property GripLight() As System.Drawing.Color
Get
Return Color.FromArgb(&HFF, &HFF, &HFF)
End Get
End Property

Public Overrides ReadOnly Property ImageMarginGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HFE, &HFE, &HFB)
End Get
End Property

Public Overrides ReadOnly Property ImageMarginGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&HBD, &HBD, &HA3)
End Get
End Property

Public Overrides ReadOnly Property ImageMarginGradientMiddle() As
System.Drawing.Color
Get
Return Color.FromArgb(&HEC, &HE7, &HE0)
End Get
End Property

Public Overrides ReadOnly Property ImageMarginRevealedGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HF7, &HF6, &HEF)
End Get
End Property

Public Overrides ReadOnly Property ImageMarginRevealedGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(230, &HE3, 210)
End Get
End Property

Public Overrides ReadOnly Property ImageMarginRevealedGradientMiddle()
As System.Drawing.Color
Get
Return Color.FromArgb(&HF2, 240, &HE4)
End Get
End Property

Public Overrides ReadOnly Property MenuBorder() As System.Drawing.Color
Get
Return Color.FromArgb(&H8A, &H86, &H7A)
End Get
End Property

Public Overrides ReadOnly Property MenuItemBorder() As
System.Drawing.Color
Get
Return Color.FromArgb(&H31, &H6A, &HC5)
End Get
End Property

Public Overrides ReadOnly Property MenuItemPressedGradientBegin() As
System.Drawing.Color
Get
Return MyBase.MenuItemPressedGradientBegin
End Get
End Property

Public Overrides ReadOnly Property MenuItemPressedGradientEnd() As
System.Drawing.Color
Get
Return MyBase.MenuItemPressedGradientEnd
End Get
End Property

Public Overrides ReadOnly Property MenuItemPressedGradientMiddle() As
System.Drawing.Color
Get
Return MyBase.MenuItemPressedGradientMiddle
End Get
End Property

Public Overrides ReadOnly Property MenuItemSelected() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property MenuItemSelectedGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property MenuItemSelectedGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC1, 210, &HEE)
End Get
End Property

Public Overrides ReadOnly Property MenuStripGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HE5, &HE5, &HD7)
End Get
End Property

Public Overrides ReadOnly Property MenuStripGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&HF4, &HF2, &HE8)
End Get
End Property

Public Overrides ReadOnly Property OverflowButtonGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HF3, &HF2, 240)
End Get
End Property

Public Overrides ReadOnly Property OverflowButtonGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&H92, &H92, &H76)
End Get
End Property

Public Overrides ReadOnly Property OverflowButtonGradientMiddle() As
System.Drawing.Color
Get
Return Color.FromArgb(&HE2, &HE1, &HDB)
End Get
End Property

Public Overrides ReadOnly Property RaftingContainerGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HE5, &HE5, &HD7)
End Get
End Property

Public Overrides ReadOnly Property RaftingContainerGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(&HF4, &HF2, &HE8)
End Get
End Property

Public Overrides ReadOnly Property SeparatorDark() As
System.Drawing.Color
Get
Return Color.FromArgb(&HC5, &HC2, &HB8)
End Get
End Property

Public Overrides ReadOnly Property SeparatorLight() As
System.Drawing.Color
Get
Return Color.FromArgb(&HFF, &HFF, &HFF)
End Get
End Property

Public Overrides ReadOnly Property ToolStripBorder() As
System.Drawing.Color
Get
Return Color.FromArgb(&HA3, &HA3, &H7C)
End Get
End Property

Public Overrides ReadOnly Property ToolStripDropDownBackground() As
System.Drawing.Color
Get
Return Color.FromArgb(&HFC, &HFC, &HF9)
End Get
End Property

Public Overrides ReadOnly Property ToolStripGradientBegin() As
System.Drawing.Color
Get
Return Color.FromArgb(&HF7, &HF6, &HEF)
End Get
End Property

Public Overrides ReadOnly Property ToolStripGradientEnd() As
System.Drawing.Color
Get
Return Color.FromArgb(230, &HE3, 210)
End Get
End Property

Public Overrides ReadOnly Property ToolStripGradientMiddle() As
System.Drawing.Color
Get
Return Color.FromArgb(&HF2, 240, &HE4)
End Get
End Property
End Class

Ken
------------
"Teemu" <ts*****@hotmail.com> wrote in message
news:dp**********@phys-news4.kolumbus.fi...
I'm wondering if there is a easy way to change for example toolstrips
appearance. I'd like to have the same theme as in VB2005. Brown backgroung
instead of the light blue. Can this be done without creating own custom
draw procedure?

Somehow the theme of Visual Studio looks more professional than the
original blue color.

-Teemu

Jan 4 '06 #2

"Ken Tucker [MVP]" <vb***@bellsouth.net> kirjoitti
viestissä:OB**************@TK2MSFTNGP10.phx.gbl...
Hi,

You can change the color scheme by creating a new ProfessionColorTable.
Then tell the toolstrip renderer to use the new color table. I created a
color table based on the c# code found here.

http://blogs.msdn.com/jfoscoding/articles/489637.aspx

To changing the color scheme of the renderer

ToolStrip1.Renderer = New ToolStripProfessionalRenderer(New
TanColorScheme)

Here is the code for the professionalcolortable


Thanks for your answer, I'll try that.

-Teemu

Jan 5 '06 #3

"Teemu" <ts*****@hotmail.com> kirjoitti
viestissä:dp**********@phys-news4.kolumbus.fi...
Thanks for your answer, I'll try that.


Yes, this works just how I wanted. I made just a little fine tuning, I
changed ToolStripGradientEnd to Color.FromArgb(192, 192, 168) and now it
looks a bit better.

-Teemu

Jan 5 '06 #4
Hi,

Yes it does.

Ken
-------------
"Teemu" <ts*****@hotmail.com> wrote in message
news:dp**********@phys-news4.kolumbus.fi...

"Teemu" <ts*****@hotmail.com> kirjoitti
viestissä:dp**********@phys-news4.kolumbus.fi...
Thanks for your answer, I'll try that.


Yes, this works just how I wanted. I made just a little fine tuning, I
changed ToolStripGradientEnd to Color.FromArgb(192, 192, 168) and now it
looks a bit better.

-Teemu

Jan 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Maximus | last post by:
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...
1
by: jincheng | last post by:
I add a toolstrip control on a windows form, set it's modifiers as protected. Then I add another form which inherited from the first one. But the property of the toolstrip on the second form is...
0
by: Jon Davis | last post by:
I'm taking the items from a menustrip of a control and moving them to the parent form's menustrip: private void TakeMenus(AdminControl ac) { foreach (Control c in ac.Controls) { if (c is...
1
by: Franky | last post by:
I saw the following on the Internet and wonder if you have any inside info about future improvements to the ToolStrip family that can be shared ? Is it possible to have the same items in two...
1
by: chandu | last post by:
Hello , I am developing an application which it contains one MenuStrip and ToolStrip. now i have to replace these controls with some other controls. is dotnet providing any alternate controls...
2
by: Doc John | last post by:
After I've added the menustrip and the toolstrip to my MDI windows Form (and I've added their respective items), I notice that the items disappear. They're still in the code, but the association...
0
by: DarkMoebius | last post by:
Hello everybody. I want to do a MdiChilds bar. Like the Windows Task Bar. It is possible in a MenuStrip item with the property: Me.MenuStrip.MdiWindowListItem = MenuItem I want same...
0
by: CAM | last post by:
Hello, Can anyone tell me if its possible to create one menustrip, toolstrip, and one statusstrip and attached to three to four forms? I just don't want to recreate the strips for every form. ...
3
HaLo2FrEeEk
by: HaLo2FrEeEk | last post by:
Ok, I have a menuStrip and a toolStrip. the menuStrip is laid out like this: Actions Connect Disconnect - Exit Pretty simple. The toolstrip has 1 item, a toolstripstatus. I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.