|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Color theme of toolstrip and menustripI'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 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 ------------ Show quoteHide quote "Teemu" <tsir***@hotmail.com> wrote in message news:dpgvsu$bih$1@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 "Ken Tucker [MVP]" <vb***@bellsouth.net> kirjoitti viestissä:OBJcUiYEGHA.3***@TK2MSFTNGP10.phx.gbl...Show quoteHide quote > Hi, Thanks for your answer, I'll try that.> > 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 -Teemu "Teemu" <tsir***@hotmail.com> kirjoitti viestissä:dpjl5u$2e***@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 Hi,
Yes it does. Ken ------------- Show quoteHide quote "Teemu" <tsir***@hotmail.com> wrote in message news:dpjm79$p41$1@phys-news4.kolumbus.fi... > > "Teemu" <tsir***@hotmail.com> kirjoitti > viestissä:dpjl5u$2e***@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
SQL Data Adapter
To VB or not to VB? To VB or not to VB? Excel automation??? VS2005 - Debug and Locked Files SqlConnection component in VB.2005 For each ..... next Question Setup and Deployment and Microsoft Jet OLE DB Provider generics question Dir(strPath, +R +A +S +H) keeps returning hidden folders |
|||||||||||||||||||||||