如何更改 .NET 中菜单条和菜单的默认背景颜色?

How do you change the default background color for menustrips and menus in .NET?(如何更改 .NET 中菜单条和菜单的默认背景颜色?)
本文介绍了如何更改 .NET 中菜单条和菜单的默认背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

这些天使用 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 中菜单条和菜单的默认背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

ActiveDirectory error 0x8000500c when traversing properties(遍历属性时 ActiveDirectory 错误 0x8000500c)
search by samaccountname with wildcards(使用通配符按 samaccountname 搜索)
Get the list of Groups for the given UserPrincipal(获取给定 UserPrincipal 的组列表)
Can you find an Active Directory User#39;s Primary Group in C#?(你能在 C# 中找到 Active Directory 用户的主要组吗?)
How to register System.DirectoryServices for use in SQL CLR User Functions?(如何注册 System.DirectoryServices 以在 SQL CLR 用户函数中使用?)
Query From LDAP for User Groups(从 LDAP 查询用户组)