Groups | Blog | Home
all groups > vb.net controls > october 2004 >

vb.net controls : context menus with icons



Matt Michael
10/19/2004 11:11:28 AM
Hi, is there any way to add menu items to a context menu with icons next to
them. When I declare a menuitem, it does not seem like there is a .icon
property or anything similar or intuitive like that. An example that
illustrates this is right clicking on your desktop, choosing "New", and for
each type of file it displays a different icon next to it. Thanks for your
help!

BluDog
10/19/2004 4:28:32 PM
On Tue, 19 Oct 2004 11:11:28 -0400, "Matt Michael"
[quoted text, click to view]

You would have to inherit from the MenuItem class and add an image
property, then Override the OnPaint method to draw the icon where you
want it.

Hope this helps

AddThis Social Bookmark Button