Paip. c #. net shortcut menu with icon
Author Attilax, EMAIL: 1466519819@qq.com
ContextMenuStrip must be used to replace the traditional ContextMenu... ContextMenuStrip supports icons, while ContextMenu does not.
ContextMenu is in VS2005, and 08 is upgraded to ContextMenuStrip. The upgraded components are more powerful.
Replace ContextMenuStrip with ContextMenu. You can associate ContextMenuStrip with any control. Right-click the control to automatically display the shortcut menu. You can use the Show method to display ContextMenuStrip programmatically. ContextMenuStrip supports cancelable Opening and Closing events to handle dynamic filling and multiple-click schemes. ContextMenuStrip supports image, menu item check status, text, access key, shortcut key, and cascading menu.
Although ContextMenuStrip replaces and adds functions of the ContextMenu control of previous versions, it retains the ContextMenu considering backward compatibility and future use (if needed.
ToolStripMenuItem aboutMenu2 = new ToolStripMenuItem ("about the author ATTILAX ");
AboutMenu2.Image = Image. FromFile (pathC23.appPathDisk () + "\ APTN. ico ");
Policyicon1.contextmenustrip = new System. Windows. Forms. ContextMenuStrip ();
NotifyIcon1.ContextMenuStrip. Items. Add (aboutMenu2 );