自定义菜单栏c# [英] Custom Menu Strip c#

查看:135
本文介绍了自定义菜单栏c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的问题,如何在C#上自定义菜单栏? VS提供了一些自定义选项,但没有太多.

我想更改菜单边框的颜色以及菜单中所选项目的颜色.我在这里给你一个例子.我想用c#来做,但这是用VB编写的.

链接:完全可自定义的菜单,工具,上下文菜单和状态条

在此先感谢您.

I have a simple question, How can I customize a Menu Strip on C#? VS gives you some customize options, but not too many.

I would like to change the menu border color, and the color of the selected item in the menu. I leave you here an example. I would like to do this in c#, but this is written on VB.

Link: Fully customizable Menu-, Tool-, ContextMenu-, and Status strips

Thanks in advance.

推荐答案

首先(您可能已经注意到),您不能在Q/A中发布图像.其次,采用引用的文章中的代码,并将其转换为C#.有很多免费的在线转换器可用-Google是您的朋友.您甚至可能会在此过程中学到一些东西.
First (and you may have noticed already), you can''t post images in Q/A. Second, take the code in the cited article, and convert it to C#. There are plenty of free online converters available - google is your friend. You might even learn something in the process.


来这里转换VB-> C#:
http://c.thuvienit.com/vb-to-csharp.aspx
come here to convert VB--> C#:
http://c.thuvienit.com/vb-to-csharp.aspx


嘿,这篇文章包括解决方案的DLL,将它们作为参考添加到您的项目并将其添加到Visual Studio的工具箱(控件框)中,它们添加控件,添加菜单栏和外观控件并选择预设"或自定义颜色",然后在控件的外观"属性中选择外观控制,仅此而已,这就是Dll的好处,它们可以用VB或C#编写,并且可以在任何人上工作,我对其进行了测试,它们工作得很漂亮,无需转换代码,不需要它...干杯.
Hey man, this article includes the DLL''s of the solution, add them as a reference in your project and add them too in Visual Studio''s ToolBox (Control Box), them add the control, add a menu strip and the appearance control and select a Preset or customize color, then in the control in the "appearance" property select the appearance control, and that''s it, that''s the good thing of Dll''s, they can be writen in VB or C# and work on anyone, I test it and they work beautifully, don''t convert the code, there''s no need for it... cheers.


这篇关于自定义菜单栏c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆