ToolStripDropDown.Close ToolStripDropDown.Close ToolStripDropDown.Close ToolStripDropDown.Close Method

정의

ToolStripDropDown 컨트롤을 닫습니다.Closes the ToolStripDropDown control.

오버로드

Close(ToolStripDropDownCloseReason) Close(ToolStripDropDownCloseReason) Close(ToolStripDropDownCloseReason) Close(ToolStripDropDownCloseReason)

지정한 이유에 대해 ToolStripDropDown 컨트롤을 닫습니다.Closes the ToolStripDropDown control for the specified reason.

Close() Close() Close() Close()

ToolStripDropDown 컨트롤을 닫습니다.Closes the ToolStripDropDown control.

Close(ToolStripDropDownCloseReason) Close(ToolStripDropDownCloseReason) Close(ToolStripDropDownCloseReason) Close(ToolStripDropDownCloseReason)

지정한 이유에 대해 ToolStripDropDown 컨트롤을 닫습니다.Closes the ToolStripDropDown control for the specified reason.

public:
 void Close(System::Windows::Forms::ToolStripDropDownCloseReason reason);
public void Close (System.Windows.Forms.ToolStripDropDownCloseReason reason);
member this.Close : System.Windows.Forms.ToolStripDropDownCloseReason -> unit
Public Sub Close (reason As ToolStripDropDownCloseReason)

매개 변수

예제

다음 코드 예제에는 명시적으로 닫을 때 닫는 이유를 지정 하는 방법을 보여 줍니다.는 ToolStripDropDown 컨트롤을 Close 메서드.The following code example demonstrates how to specify a close reason when explicitly closing a ToolStripDropDown control with the Close method.

// This method explicitly closes the ToolStripDropDown control
// and specifies the reason for closing as CloseCalled.
private void closeButton_Click(object sender, EventArgs e)
{
    this.contextMenuStrip1.Close(ToolStripDropDownCloseReason.CloseCalled);
}
' This method explicitly closes the ToolStripDropDown control
' and specifies the reason for closing as CloseCalled.
Private Sub closeButton_Click(sender As Object, e As EventArgs) Handles closeButton.Click
   Me.contextMenuStrip1.Close(ToolStripDropDownCloseReason.CloseCalled)
 End Sub

설명

사용 합니다 Close 닫는 메서드를를 ToolStripDropDown 키보드 동작이 발생 하는 애플리케이션이 시작 되 나 포커스를 변경 하는 경우 또는 지정 된 경우 컨트롤을 클릭 하 여 항목을 선택 하는 경우와 같은 특정 조건에서 제어 합니다.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.

추가 정보

Close() Close() Close() Close()

ToolStripDropDown 컨트롤을 닫습니다.Closes the ToolStripDropDown control.

public:
 void Close();
public void Close ();
member this.Close : unit -> unit
Public Sub Close ()

적용 대상