BoundsSpecified BoundsSpecified BoundsSpecified BoundsSpecified Enum

Definición

Especifica los límites del control que se utilizarán al definir el tamaño y la posición de un control.Specifies the bounds of the control to use when defining a control's size and position.

Esta enumeración tiene el atributo FlagsAttribute, que permite una combinación bit a bit de sus valores de miembro.

public enum class BoundsSpecified
[System.Flags]
public enum BoundsSpecified
type BoundsSpecified = 
Public Enum BoundsSpecified
Herencia
BoundsSpecifiedBoundsSpecifiedBoundsSpecifiedBoundsSpecified
Atributos

Campos

All All All All 15

Especifica que se definen los valores de propiedad Location y Size.Specifies that both the Location and Size property values are defined.

Height Height Height Height 8

Especifica que se define el alto del control.Specifies that the height of the control is defined.

Location Location Location Location 3

Especifica que se definen las coordenadas X y Y del control.Specifies that both the X and Y coordinates of the control are defined.

None None None None 0

No se especifican límites.No bounds are specified.

Size Size Size Size 12

Especifica que se definen los valores de propiedad Width y Height del control.Specifies that both the Width and Height property values of the control are defined.

Width Width Width Width 4

Especifica que se define el ancho del control.Specifies that the width of the control is defined.

X X X X 1

Especifica que se define el margen izquierdo del control.Specifies that the left edge of the control is defined.

Y Y Y Y 2

Especifica que se define el margen superior del control.Specifies that the top edge of the control is defined.

Ejemplos

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

Comentarios

Use los miembros de esta enumeración cuando llame SetBoundsCore a SetBounds los métodos y Control de la clase.Use the members of this enumeration when calling the SetBoundsCore and SetBounds methods of the Control class.

Se aplica a

Consulte también: