BoundsSpecified Výčet

Definice

Určuje hranice ovládacího prvku, které se mají použít při definování velikosti a pozice ovládacího prvku.

Tento výčet podporuje bitové kombinace hodnot jeho členů.

public enum class BoundsSpecified
[System.Flags]
public enum BoundsSpecified
[<System.Flags>]
type BoundsSpecified = 
Public Enum BoundsSpecified
Dědičnost
BoundsSpecified
Atributy

Pole

All 15

Určuje, že jsou definovány hodnoty vlastností Location i Size vlastnosti.

Height 8

Určuje, že je definována výška ovládacího prvku.

Location 3

Určuje, že X jsou definovány jak souřadnice ovládacího prvku, tak Y souřadnice.

None 0

Nejsou zadány žádné hranice.

Size 12

Určuje, že jsou definovány Width Height hodnoty vlastností ovládacího prvku.

Width 4

Určuje, že je definována šířka ovládacího prvku.

X 1

Určuje, že je definován levý okraj ovládacího prvku.

Y 2

Určuje, že je definován horní okraj ovládacího prvku.

Příklady

private:
   void MyForm_Layout( Object^ /*sender*/, System::Windows::Forms::LayoutEventArgs^ /*e*/ )
   {
      // Center the Form on the user's screen everytime it requires a Layout.
      this->SetBounds( (Screen::GetBounds( this ).Width / 2) - (this->Width / 2), (Screen::GetBounds( this ).Height / 2) - (this->Height / 2), this->Width, this->Height, BoundsSpecified::Location );
   }
private void MyForm_Layout(object sender, System.Windows.Forms.LayoutEventArgs e)
{
   // Center the Form on the user's screen everytime it requires a Layout.
   this.SetBounds((Screen.GetBounds(this).Width/2) - (this.Width/2),
       (Screen.GetBounds(this).Height/2) - (this.Height/2),
       this.Width, this.Height, BoundsSpecified.Location);	
}

Private Sub MyForm_Layout(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.LayoutEventArgs) Handles MyBase.Layout

    ' Center the Form on the user's screen everytime it requires a Layout.
    Me.SetBounds((System.Windows.Forms.Screen.GetBounds(Me).Width / 2) - (Me.Width / 2), _
        (System.Windows.Forms.Screen.GetBounds(Me).Height / 2) - (Me.Height / 2), _
        Me.Width, Me.Height, System.Windows.Forms.BoundsSpecified.Location)
End Sub

Poznámky

Při volání SetBoundsCore a SetBounds metod třídy použijte členy tohoto výčtu Control .

Platí pro

Viz také