首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

怎么给菜单加图标

2012-01-03 
如何给菜单加图标?我是在.net中用C#写程序的,现在我要给一些菜单加一图标,该怎么办?有人告诉我可在DrawIte

如何给菜单加图标?
我是在.net中用C#写程序的,现在我要给一些菜单加一图标,该怎么办?有人告诉我可在DrawItem事件中,自己画,但我想有没有更简单的方法呢?比如直接设计它的某些属性就可以了?如果非得自己画,谁能给个例子吗?
谢谢了!

[解决办法]
1) .NET 1.1 or earlier version: you should construct a subclass of "MenuItem " to enable this feature programmingly and explicitly by yourself
2) .NET 2.0 or later version: refer to the "Image " property of ToolStripMenuItem class, this will meet your purpose, I reckon.

热点排行