BoundsSpecified 열거형

정의

컨트롤의 크기와 위치를 정의할 때 사용할 컨트롤의 범위를 지정합니다.

이 열거형은 멤버 값의 비트 조합을 지원합니다.

public enum class BoundsSpecified
[System.Flags]
public enum BoundsSpecified
[<System.Flags>]
type BoundsSpecified = 
Public Enum BoundsSpecified
상속
BoundsSpecified
특성

필드

Name Description
None 0

범위가 지정되지 않았습니다.

X 1

컨트롤의 왼쪽 가장자리가 정의되도록 지정합니다.

Y 2

컨트롤의 위쪽 가장자리가 정의되도록 지정합니다.

Location 3

컨트롤의 X 좌표와 Y 좌표가 모두 정의되도록 지정합니다.

Width 4

컨트롤의 너비가 정의되도록 지정합니다.

Height 8

컨트롤의 높이가 정의되도록 지정합니다.

Size 12

컨트롤의 Width 속성 값과 Height 속성 값이 모두 정의되도록 지정합니다.

All 15

속성 값과 Location 속성 값이 모두 Size 정의되도록 지정합니다.

예제

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

설명

클래스 및 메서드를 호출 SetBoundsCoreSetBounds 할 때 이 열거형의 멤버를 Control 사용합니다.

적용 대상

추가 정보