ToolStripDropDown.Show Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Placerar den ToolStripDropDown relativa till de angivna koordinaterna.
Överlagringar
| Name | Description |
|---|---|
| Show() |
ToolStripDropDown Visar kontrollen i sin standardposition. |
| Show(Point) |
Placerar den ToolStripDropDown relativa till den angivna skärmplatsen. |
| Show(Point, ToolStripDropDownDirection) |
Placerar den ToolStripDropDown relativa till den angivna kontrollplatsen och med den angivna riktningen i förhållande till den överordnade kontrollen. |
| Show(Int32, Int32) |
Placerar den ToolStripDropDown relativa till de angivna skärmkoordinaterna. |
| Show(Control, Point) |
Placerar den ToolStripDropDown relativa till den angivna kontrollplatsen. |
| Show(Control, Point, ToolStripDropDownDirection) |
Placerar den ToolStripDropDown relativa till den angivna kontrollen på den angivna platsen och med den angivna riktningen i förhållande till den överordnade kontrollen. |
| Show(Control, Int32, Int32) |
Placerar den ToolStripDropDown relativa till den angivna kontrollens vågräta och lodräta skärmkoordinater. |
Show()
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
ToolStripDropDown Visar kontrollen i sin standardposition.
public:
void Show();
[System.ComponentModel.Browsable(false)]
public void Show();
[<System.ComponentModel.Browsable(false)>]
override this.Show : unit -> unit
Public Sub Show ()
- Attribut
Exempel
Följande kodexempel visar hur du ToolStripDropDown visar kontrollen vid dess standardposition.
// 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
Gäller för
Show(Point)
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
Placerar den ToolStripDropDown relativa till den angivna skärmplatsen.
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)
Parametrar
- screenLocation
- Point
Den vågräta och lodräta platsen för skärmens övre vänstra hörn, i bildpunkter.
Exempel
Följande kodexempel visar hur du ToolStripDropDown visar kontrollen vid en fast punkt.
// 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
Gäller för
Show(Point, ToolStripDropDownDirection)
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
Placerar den ToolStripDropDown relativa till den angivna kontrollplatsen och med den angivna riktningen i förhållande till den överordnade kontrollen.
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)
Parametrar
- position
- Point
Den vågräta och lodräta platsen för referenskontrollens övre vänstra hörn, i bildpunkter.
- direction
- ToolStripDropDownDirection
Ett av ToolStripDropDownDirection värdena.
Exempel
Följande kodexempel visar hur du visar ToolStripDropDown kontrollen vid en fast punkt i den angivna riktningen.
// 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
Gäller för
Show(Int32, Int32)
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
Placerar den ToolStripDropDown relativa till de angivna skärmkoordinaterna.
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)
Parametrar
- x
- Int32
Den vågräta skärmkoordinaten i bildpunkter.
- y
- Int32
Den lodräta skärmkoordinaten i bildpunkter.
Gäller för
Show(Control, Point)
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
Placerar den ToolStripDropDown relativa till den angivna kontrollplatsen.
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)
Parametrar
- control
- Control
Kontrollen (vanligtvis en ToolStripDropDownButton) som är referenspunkten för ToolStripDropDown positionen.
- position
- Point
Den vågräta och lodräta platsen för referenskontrollens övre vänstra hörn, i bildpunkter.
Undantag
Kontrollen som anges av parametern control är null.
Gäller för
Show(Control, Point, ToolStripDropDownDirection)
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
Placerar den ToolStripDropDown relativa till den angivna kontrollen på den angivna platsen och med den angivna riktningen i förhållande till den överordnade kontrollen.
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)
Parametrar
- control
- Control
Kontrollen (vanligtvis en ToolStripDropDownButton) som är referenspunkten för ToolStripDropDown positionen.
- position
- Point
Den vågräta och lodräta platsen för referenskontrollens övre vänstra hörn, i bildpunkter.
- direction
- ToolStripDropDownDirection
Ett av ToolStripDropDownDirection värdena.
Undantag
Kontrollen som anges av parametern control är null.
Exempel
Följande kodexempel visar hur du ToolStripDropDown visar kontrollen i förhållande till den överordnade kontrollen.
// 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
Gäller för
Show(Control, Int32, Int32)
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
- Källa:
- ToolStripDropDown.cs
Placerar den ToolStripDropDown relativa till den angivna kontrollens vågräta och lodräta skärmkoordinater.
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)
Parametrar
- control
- Control
Kontrollen (vanligtvis en ToolStripDropDownButton) som är referenspunkten för ToolStripDropDown positionen.
- x
- Int32
Kontrollens vågräta skärmkoordinat i bildpunkter.
- y
- Int32
Kontrollens lodräta skärmkoordinat i bildpunkter.
Undantag
Kontrollen som anges av parametern control är null.