ToolStripDropDown::Close Method (ToolStripDropDownCloseReason)
.NET Framework (current version)
Closes the ToolStripDropDown control for the specified reason.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- reason
-
Type:
System.Windows.Forms::ToolStripDropDownCloseReason
One of the ToolStripDropDownCloseReason values.
Use the Close method to close a ToolStripDropDown control under specific conditions, such as when an application is started or an item is selected by clicking the control, if the focus changes, or if specified keyboard action occurs.
The following code example demonstrates how to specify a close reason when explicitly closing a ToolStripDropDown control with the Close method.
.NET Framework
Available since 2.0
Available since 2.0
Show: