問題描述
這些天使用 Visual C#(特別是 Visual C# 2008)似乎菜單條和菜單的默認顏色是藍色,對我來說這看起來很奇怪,我真的很想覆蓋它.我猜 Visual Studio 正在從我選擇的系統主題或其他東西中選擇這種藍色,但是在我的系統上運行的其他 Windows 應用程序沒有這種藍色,所以我不知道為什么我的 .NET 應用程序必須有它.;)
These days with Visual C# (Visual C# 2008 specifically) it seems that the default color for menustrips and menus is blue, which to me looks really strange and is something that I'd really like to override. I'm guessing that Visual Studio is picking up this blue color from my selected system theme or something, however no other Windows app running on my system has this blue color so I don't know why my .NET apps would have to have it. ;)
無論如何,我注意到如果我使用舊版本的 Visual Studio (Visual Studio.NET) 創建應用程序,則菜單條和菜單的默認背景顏色是您希望看到的標準灰色.這是我認為的問題的一種解決方案,但它似乎有點愚蠢,我真的很想找到一種方法來在當前版本的 Visual C# 中覆蓋它.
Anyway, I noticed that if I create an application using an older version of Visual Studio (Visual Studio.NET), the default background color for menustrips and menus is the standard gray that you'd expect to see. This is one solution to the problem I suppose, but it seems like kind of a stupid one and I'd really like to find a way to override it in the current version of Visual C#.
推薦答案
DotNet 1.x 沒有 MenuStrip,而是使用標準的 Windows 菜單.
DotNet 1.x didn't have a MenuStrip, and used a standard Windows menu.
DotNet 2.0 及更高版本具有 MenuStrip,而 VS 7 及更高版本從工具箱中刪除 MainMenu 并將其替換為 MenuStrip,它使用 Office Xp 2003 主題,因此采用藍色配色方案用于 MenuStrip 和 ToolStrip.
DotNet versions 2.0 and up have the MenuStrip, and VS 7 and up removes the MainMenu from the toolbox and replaces it with a MenuStrip, which uses the Office Xp 2003 theme, hence the blue color scheme for the MenuStrip and ToolStrip.
MainMenu 仍然可以添加到標準 Windows 菜單的工具箱中.
The MainMenu can still be added to the toolbox for a standard Windows menu.
這篇關于如何更改 .NET 中菜單條和菜單的默認背景顏色?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!