ToolStripDropDown.Show Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Positioniert die ToolStripDropDown relativ zu den angegebenen Koordinaten.
Überlädt
| Name | Beschreibung |
|---|---|
| Show() |
Zeigt das ToolStripDropDown Steuerelement an seiner Standardposition an. |
| Show(Point) |
Positioniert die ToolStripDropDown relativ zur angegebenen Bildschirmposition. |
| Show(Point, ToolStripDropDownDirection) |
Positioniert die ToolStripDropDown relativ zur angegebenen Steuerelementposition und mit der angegebenen Richtung relativ zum übergeordneten Steuerelement. |
| Show(Int32, Int32) |
Positioniert die ToolStripDropDown relativ zu den angegebenen Bildschirmkoordinaten. |
| Show(Control, Point) |
Positioniert den ToolStripDropDown Relativen zur angegebenen Steuerelementposition. |
| Show(Control, Point, ToolStripDropDownDirection) |
Positioniert den ToolStripDropDown Relativen zum angegebenen Steuerelement an der angegebenen Position und mit der angegebenen Richtung relativ zum übergeordneten Steuerelement. |
| Show(Control, Int32, Int32) |
Positioniert die ToolStripDropDown relativen horizontalen und vertikalen Bildschirmkoordinaten des angegebenen Steuerelements. |
Show()
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Zeigt das ToolStripDropDown Steuerelement an seiner Standardposition an.
public:
void Show();
[System.ComponentModel.Browsable(false)]
public void Show();
[<System.ComponentModel.Browsable(false)>]
override this.Show : unit -> unit
Public Sub Show ()
- Attribute
Beispiele
Im folgenden Codebeispiel wird veranschaulicht, wie das ToolStripDropDown Steuerelement an seiner Standardposition angezeigt wird.
// 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
Gilt für:
Show(Point)
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Positioniert die ToolStripDropDown relativ zur angegebenen Bildschirmposition.
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)
Parameter
- screenLocation
- Point
Die horizontale und vertikale Position der oberen linken Ecke des Bildschirms in Pixeln.
Beispiele
Im folgenden Codebeispiel wird veranschaulicht, wie das ToolStripDropDown Steuerelement an einem festen Punkt angezeigt wird.
// 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
Gilt für:
Show(Point, ToolStripDropDownDirection)
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Positioniert die ToolStripDropDown relativ zur angegebenen Steuerelementposition und mit der angegebenen Richtung relativ zum übergeordneten Steuerelement.
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)
Parameter
- position
- Point
Die horizontale und vertikale Position der oberen linken Ecke des Referenzsteuerelements in Pixeln.
- direction
- ToolStripDropDownDirection
Einer der ToolStripDropDownDirection Werte.
Beispiele
Im folgenden Codebeispiel wird veranschaulicht, wie das ToolStripDropDown Steuerelement an einem festen Punkt in der angegebenen Richtung angezeigt wird.
// 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
Gilt für:
Show(Int32, Int32)
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Positioniert die ToolStripDropDown relativ zu den angegebenen Bildschirmkoordinaten.
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)
Parameter
- x
- Int32
Die horizontale Bildschirmkoordinate in Pixel.
- y
- Int32
Die vertikale Bildschirmkoordinate in Pixeln.
Gilt für:
Show(Control, Point)
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Positioniert den ToolStripDropDown Relativen zur angegebenen Steuerelementposition.
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)
Parameter
- control
- Control
Das Steuerelement (in der Regel ein ToolStripDropDownButton) ist der Bezugspunkt für die ToolStripDropDown Position.
- position
- Point
Die horizontale und vertikale Position der oberen linken Ecke des Referenzsteuerelements in Pixeln.
Ausnahmen
Das durch den control Parameter angegebene Steuerelement lautet null.
Gilt für:
Show(Control, Point, ToolStripDropDownDirection)
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Positioniert den ToolStripDropDown Relativen zum angegebenen Steuerelement an der angegebenen Position und mit der angegebenen Richtung relativ zum übergeordneten Steuerelement.
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)
Parameter
- control
- Control
Das Steuerelement (in der Regel ein ToolStripDropDownButton) ist der Bezugspunkt für die ToolStripDropDown Position.
- position
- Point
Die horizontale und vertikale Position der oberen linken Ecke des Referenzsteuerelements in Pixeln.
- direction
- ToolStripDropDownDirection
Einer der ToolStripDropDownDirection Werte.
Ausnahmen
Das durch den control Parameter angegebene Steuerelement lautet null.
Beispiele
Im folgenden Codebeispiel wird veranschaulicht, wie das ToolStripDropDown Steuerelement relativ zum übergeordneten Steuerelement angezeigt wird.
// 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
Gilt für:
Show(Control, Int32, Int32)
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
- Quelle:
- ToolStripDropDown.cs
Positioniert die ToolStripDropDown relativen horizontalen und vertikalen Bildschirmkoordinaten des angegebenen Steuerelements.
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)
Parameter
- control
- Control
Das Steuerelement (in der Regel ein ToolStripDropDownButton) ist der Bezugspunkt für die ToolStripDropDown Position.
- x
- Int32
Die horizontale Bildschirmkoordinate des Steuerelements in Pixel.
- y
- Int32
Die vertikale Bildschirmkoordinate des Steuerelements in Pixel.
Ausnahmen
Das durch den control Parameter angegebene Steuerelement lautet null.