Hi Nick,
I performed a test based on your description but didn't reproduce the problem on my side.
In my test, I create a WinForm application project and add Form2 and Form3 in the project. I add a ToolStrip on the Form2 and Form3 respectively. I add a DropDownButtonwith a ToolStripMenuItemin each of the ToolStrip. The shortcut of the ToolStripMenuItem is Alt+A. In the Click event of the ToolStripMenuItem, I add a line of code to print something:
// in Form2.cs file
private void itemToolStripMenuItem_Click(object sender, EventArgs e)
{
Console.WriteLine("form2 menu item");
}
// in Form3.cs file
private void itemToolStripMenuItem_Click(object sender, EventArgs e)
{
Console.WriteLine("form3 menu item");
}
Set the IsMdiContainer property of the Form1 to true. In the Load event handler of the Form1, open Form2 and Form3:
// in Form1.cs file
private void Form1_Load(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.MdiParent = this;
frm.Show();
Form3 frm3 = new Form3();
frm3.MdiParent = this;
frm3.Show();
}
Build and run the application and press Alt+A. "form3 menu item" is printed in the Output window, which indicates the toolstrip item in the Form3 is clicked. Activate the Form2, and press Alt+A, and "form2 menu item" is printed in the Output window.
Is there any difference between your code and mine?
Linda