日期:2014-05-19  浏览次数:20738 次

如何给菜单加图标?
我是在.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.