Close ToolStripDropdown Object When Parent Container Or Form Is Clicked In C# Windows Forms
To close the ToolStripDropdown object which is part of the textbox custom control, add event handler signatures and event definition using the code below: //add statements in the custom control constructor this .Parent.Click += new EventHandler(Parent_Click); this .Parent.Move += new EventHandler(Parent_Click); //event body private void Parent_Click( object sender, EventArgs e) { _dropDown.Close(); //ToolStripDropdown object } Cheers!