How can I add icons to Menu items?
For example, see the attachment (GIF file).
If need to code, please show me the source code.
Please guide. Thank you.
Printable View
How can I add icons to Menu items?
For example, see the attachment (GIF file).
If need to code, please show me the source code.
Please guide. Thank you.
Try the proj I'd posted here in this link .
http://www.vbforums.com/showthread.p...highlight=menu
enjoy !
Did you create your own menu in a new solution ? if so , then you need to change OwnerDraw property to "True" as it's important step before your menuitems have the effects .
It's working fine now! :)
But I have a few question here whether can be solved or not? I'm trying to set the menu as similar to most Microsoft programs.
1) So far, We are using e.ItemHeight = 15 to set the size of the menu item. How can I set it to the default height and width of a menu item?
2) We are using New Font("Tahoma", 8) to set the font of the menu item. How can I set it to the default font of the menu item?
3) To display the shortcut text, how can I set it to the right indent of the menu item, like what we obverse in most Microsoft program.
4) We have to specify the coordinate to draw the icon of the menu item. How can I draw the icon to the default place of the menu item, like what we obverse in most Microsoft program.
Please guide, thank you.