I have a MenuStrip on my form, and I dynamically add and remove Subitems throughout the programs execution. I can add the items, I just don't know how to associate an event with them. Any help would be appreciated.

ToolStripMenuItem item1 = new ToolStripMenuItem("One");
 item1.Click += (sa, ea) =>
         {
            MessageBox.Show("This is 'One'.");
          };
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.