You are trying to execute code that relies on the main control thread in another thread, you should call it using the Invoke method:
toolStrip.Invoke(() => { toolStrip.DropDownItems.Add(new ToolStripItemEx("start")); });
When accessing controls / methods from a stream other than the stream that the control was originally created, you should use the control.Invoke method, it will marshal the execution of the call deletion to the main stream.
Edit: Since you are using ToolStripMenuItem not ToolStrip , ToolStripMenuItem does not have an Invoke member, so you can use the invoke form using this.Invoke "or your ToolStrip its parent element is" ToolStrip "Call, therefore:
toolStrip.GetCurrentParent().Invoke(() => { toolStrip.DropDownItems.Add(new ToolStripItemEx("start")); });
Jalal said
source share