How to add an icon to System.Windows.Forms.MenuItem?
I tried to add an icon to one of my context menu items, but I couldn't do it. Can anybody help me? Here's the code I've written: private System.Windows.Forms.ContextMenu notifyContextMenu; private void foo() { if (notifyIcon == null) { notifyIcon = new System.Windows.Forms.NotifyIcon(); } if (notifyContextMenu == null) { notifyContextMenu = new System.Windows.Forms.ContextMenu(); notifyContextMenu.MenuItems.Add("Exit"); // How do I add an icon to this context menu item? } notifyIcon.ContextMenu = notifyContextMenu; } } MainMenu/ContextMenu are obsolete, you should use the menu strip classes