1

I am trying to build a custom WinForms ToolStripDropDownMenu. I need custom menu items so I am using ToolStripControlHosts. The problem is that when the menu is open and I hit a breakpoint the menu does not disappear and stays on top of all applications.

Has anyone encountered this problem before? Is this a Visual Studio Bug?

Simple example:

Button b = new Button();
b.Click += delegate(object sender, EventArgs e)
{
   int i = 0;
};
toolStripDropDownButton1.DropDownItems.Add(new ToolStripControlHost(b));


enter image description here

LarsTech
  • 80,625
  • 14
  • 153
  • 225
Tamas Pataky
  • 353
  • 4
  • 16

0 Answers0