ToolStripDropDown.Show 메서드

정의

ToolStripDropDown 지정된 좌표를 기준으로 위치를 지정합니다.

오버로드

Name Description
Show()

컨트롤을 ToolStripDropDown 기본 위치에 표시합니다.

Show(Point)

ToolStripDropDown 지정된 화면 위치를 기준으로 위치를 지정합니다.

Show(Point, ToolStripDropDownDirection)

ToolStripDropDown 부모 컨트롤을 기준으로 지정된 방향을 사용하여 지정된 컨트롤 위치에 상대적인 위치를 지정합니다.

Show(Int32, Int32)

ToolStripDropDown 지정된 화면 좌표를 기준으로 위치를 지정합니다.

Show(Control, Point)

ToolStripDropDown 지정된 컨트롤 위치를 기준으로 위치를 지정합니다.

Show(Control, Point, ToolStripDropDownDirection)

ToolStripDropDown 부모 컨트롤을 기준으로 지정된 방향을 사용하여 지정된 위치에 지정된 컨트롤의 상대 위치를 지정합니다.

Show(Control, Int32, Int32)

ToolStripDropDown 지정된 컨트롤의 가로 및 세로 화면 좌표를 기준으로 위치를 지정합니다.

Show()

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

컨트롤을 ToolStripDropDown 기본 위치에 표시합니다.

public:
 void Show();
[System.ComponentModel.Browsable(false)]
public void Show();
[<System.ComponentModel.Browsable(false)>]
override this.Show : unit -> unit
Public Sub Show ()
특성

예제

다음 코드 예제에서는 컨트롤을 ToolStripDropDown 기본 위치에 표시 하는 방법을 보여 줍니다.

// This method calls the ToolStripDropDown control's Show 
// method to display the ContextMenuStrip in its 
// default location.
private void showButton_Click(object sender, EventArgs e)
{
    this.contextMenuStrip1.Show();
}
' This method calls the ToolStripDropDown control's Show 
' method to display the ContextMenuStrip in its 
' default location.
Private Sub showButton_Click(sender As Object, e As EventArgs) Handles showButton.Click
   Me.contextMenuStrip1.Show()
 End Sub

적용 대상

Show(Point)

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

ToolStripDropDown 지정된 화면 위치를 기준으로 위치를 지정합니다.

public:
 void Show(System::Drawing::Point screenLocation);
public void Show(System.Drawing.Point screenLocation);
override this.Show : System.Drawing.Point -> unit
Public Sub Show (screenLocation As Point)

매개 변수

screenLocation
Point

화면 왼쪽 위 모서리의 가로 및 세로 위치(픽셀)입니다.

예제

다음 코드 예제에서는 고정 된 지점에서 컨트롤을 ToolStripDropDown 표시 하는 방법을 보여 줍니다.

// This method calls the ToolStripDropDown control's Show 
// method to display the ContextMenuStrip at a fixed point.
private void showAtPointButton_Click(object sender, EventArgs e)
{
    this.contextMenuStrip1.Show(23, 55);
}
' This method calls the ToolStripDropDown control's Show 
' method to display the ContextMenuStrip at a fixed point.
Private Sub showAtPointButton_Click(sender As Object, e As EventArgs) Handles showAtPointButton.Click, button2.Click
   Me.contextMenuStrip1.Show(23, 55)
 End Sub

적용 대상

Show(Point, ToolStripDropDownDirection)

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

ToolStripDropDown 부모 컨트롤을 기준으로 지정된 방향을 사용하여 지정된 컨트롤 위치에 상대적인 위치를 지정합니다.

public:
 void Show(System::Drawing::Point position, System::Windows::Forms::ToolStripDropDownDirection direction);
public void Show(System.Drawing.Point position, System.Windows.Forms.ToolStripDropDownDirection direction);
override this.Show : System.Drawing.Point * System.Windows.Forms.ToolStripDropDownDirection -> unit
Public Sub Show (position As Point, direction As ToolStripDropDownDirection)

매개 변수

position
Point

참조 컨트롤의 왼쪽 위 모서리(픽셀)의 가로 및 세로 위치입니다.

direction
ToolStripDropDownDirection

값 중 ToolStripDropDownDirection 하나입니다.

예제

다음 코드 예제에서는 지정된 방향으로 고정 된 지점에서 컨트롤을 표시 ToolStripDropDown 하는 방법을 보여 줍니다.

// This method calls the ToolStripDropDown control's Show 
// method to display the ContextMenuStrip relative to the
// origin of the form. 
private void showRelativeButton_Click(object sender, EventArgs e)
{
    this.contextMenuStrip1.Show(this.Location, this.dropDownDirection);
}
' This method calls the ToolStripDropDown control's Show 
' method to display the ContextMenuStrip relative to the
' origin of the form. 
Private Sub showRelativeButton_Click(sender As Object, e As EventArgs)
   Me.contextMenuStrip1.Show(Me.Location, Me.dropDownDirection)
 End Sub

적용 대상

Show(Int32, Int32)

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

ToolStripDropDown 지정된 화면 좌표를 기준으로 위치를 지정합니다.

public:
 void Show(int x, int y);
public void Show(int x, int y);
override this.Show : int * int -> unit
Public Sub Show (x As Integer, y As Integer)

매개 변수

x
Int32

가로 화면 좌표(픽셀)입니다.

y
Int32

세로 화면 좌표(픽셀)입니다.

적용 대상

Show(Control, Point)

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

ToolStripDropDown 지정된 컨트롤 위치를 기준으로 위치를 지정합니다.

public:
 void Show(System::Windows::Forms::Control ^ control, System::Drawing::Point position);
public void Show(System.Windows.Forms.Control control, System.Drawing.Point position);
override this.Show : System.Windows.Forms.Control * System.Drawing.Point -> unit
Public Sub Show (control As Control, position As Point)

매개 변수

control
Control

위치의 참조 지점 ToolStripDropDownButton 인 컨트롤(일반적으로 aToolStripDropDown)입니다.

position
Point

참조 컨트롤의 왼쪽 위 모서리(픽셀)의 가로 및 세로 위치입니다.

예외

매개 변수로 지정된 컨트롤은 control .입니다 null.

적용 대상

Show(Control, Point, ToolStripDropDownDirection)

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

ToolStripDropDown 부모 컨트롤을 기준으로 지정된 방향을 사용하여 지정된 위치에 지정된 컨트롤의 상대 위치를 지정합니다.

public:
 void Show(System::Windows::Forms::Control ^ control, System::Drawing::Point position, System::Windows::Forms::ToolStripDropDownDirection direction);
public void Show(System.Windows.Forms.Control control, System.Drawing.Point position, System.Windows.Forms.ToolStripDropDownDirection direction);
override this.Show : System.Windows.Forms.Control * System.Drawing.Point * System.Windows.Forms.ToolStripDropDownDirection -> unit
Public Sub Show (control As Control, position As Point, direction As ToolStripDropDownDirection)

매개 변수

control
Control

위치의 참조 지점 ToolStripDropDownButton 인 컨트롤(일반적으로 aToolStripDropDown)입니다.

position
Point

참조 컨트롤의 왼쪽 위 모서리(픽셀)의 가로 및 세로 위치입니다.

direction
ToolStripDropDownDirection

값 중 ToolStripDropDownDirection 하나입니다.

예외

매개 변수로 지정된 컨트롤은 control .입니다 null.

예제

다음 코드 예제에서는 부모 컨트롤을 기준으로 컨트롤을 ToolStripDropDown 표시 하는 방법을 보여 줍니다.

// This method calls the ToolStripDropDown control's Show 
// method to display the ContextMenuStrip relative to the
// owning control.
private void button1_MouseUp(object sender, MouseEventArgs e)
{
    Control c = sender as Control;
    if (e.Button == MouseButtons.Right)
    {
        this.contextMenuStrip1.Show(c, e.Location, this.dropDownDirection);
    }
}
' This method calls the ToolStripDropDown control's Show 
' method to display the ContextMenuStrip relative to the
' owning control.
Private Sub button1_MouseUp(sender As Object, e As MouseEventArgs) Handles button1.MouseUp
     Dim c As Control = CType(sender, Control)
   
     If e.Button = Windows.Forms.MouseButtons.Right Then
         Me.contextMenuStrip1.Show(c, e.Location, Me.dropDownDirection)
     End If
 End Sub

적용 대상

Show(Control, Int32, Int32)

Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs
Source:
ToolStripDropDown.cs

ToolStripDropDown 지정된 컨트롤의 가로 및 세로 화면 좌표를 기준으로 위치를 지정합니다.

public:
 void Show(System::Windows::Forms::Control ^ control, int x, int y);
public void Show(System.Windows.Forms.Control control, int x, int y);
override this.Show : System.Windows.Forms.Control * int * int -> unit
Public Sub Show (control As Control, x As Integer, y As Integer)

매개 변수

control
Control

위치의 참조 지점 ToolStripDropDownButton 인 컨트롤(일반적으로 aToolStripDropDown)입니다.

x
Int32

컨트롤의 가로 화면 좌표(픽셀)입니다.

y
Int32

컨트롤의 세로 화면 좌표(픽셀)입니다.

예외

매개 변수로 지정된 컨트롤은 control .입니다 null.

적용 대상