I have been searching for a while for a simple right-click menu for a single item. For example if I right-click on a picture I want a little menu to come up with my own labels: Add, Remove etc. If anyone could help I would be most greatful.
Thanks for looking.
Here is the completed code:
ContextMenu cm = new ContextMenu();
cm.MenuItems.Add("Item 1", new EventHandler(Removepicture_Click));
cm.MenuItems.Add("Item 2", new EventHandler(Addpicture_Click));
pictureBox1.ContextMenu = cm;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…