ToolStripDropDown.Close 메서드

정의

ToolStripDropDown 컨트롤을 닫습니다.

오버로드

Close(ToolStripDropDownCloseReason)

지정한 이유에 대해 ToolStripDropDown 컨트롤을 닫습니다.

Close()

ToolStripDropDown 컨트롤을 닫습니다.

Close(ToolStripDropDownCloseReason)

지정한 이유에 대해 ToolStripDropDown 컨트롤을 닫습니다.

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)

매개 변수

예제

다음 코드 예제에서는 메서드를 사용하여 컨트롤 Close 을 명시적으로 닫을 때 가까운 이유를 지정하는 ToolStripDropDown 방법을 보여 줍니다.

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

추가 정보

적용 대상

Close()

ToolStripDropDown 컨트롤을 닫습니다.

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

적용 대상