Are you using MenuStrip?
After adding the item, we can see all the events in the "Properties" window, just double-click the event that needs to be added.
We can also add events in the code like this:
private void Form1_Load(object sender, EventArgs e)
{
MenuStrip thisMenuStrip = new MenuStrip();
ToolStripMenuItem thisFileItem = new ToolStripMenuItem("&File");
thisFileItem.DropDownItems.Add("&Clear");
thisFileItem.DropDownItems.Add("E&xit");
thisFileItem.DropDownItems[1].Click += Item_Click;
thisMenuStrip.Items.Add(thisFileItem);
this.Controls.Add(thisMenuStrip);
thisMenuStrip.Name = "menuStrip";
TabIndex = 0;
}
private void Item_Click(object sender, EventArgs e)
{
MessageBox.Show(sender.ToString());
}
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.