Control.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 메서드

정의

이 컨트롤의 지정된 범위를 설정합니다.

protected:
 virtual void SetBoundsCore(int x, int y, int width, int height, System::Windows::Forms::BoundsSpecified specified);
protected virtual void SetBoundsCore (int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified);
abstract member SetBoundsCore : int * int * int * int * System.Windows.Forms.BoundsSpecified -> unit
override this.SetBoundsCore : int * int * int * int * System.Windows.Forms.BoundsSpecified -> unit
Protected Overridable Sub SetBoundsCore (x As Integer, y As Integer, width As Integer, height As Integer, specified As BoundsSpecified)

매개 변수

x
Int32

컨트롤의 새 Left 속성 값입니다.

y
Int32

컨트롤의 새 Top 속성 값입니다.

width
Int32

컨트롤의 새 Width 속성 값입니다.

height
Int32

컨트롤의 새 Height 속성 값입니다.

specified
BoundsSpecified

BoundsSpecified 값의 비트 조합입니다.

예제

다음 코드 예제에서는 컨트롤이 SetBoundsCore 고정된 크기로 유지되도록 메서드를 재정의합니다. 이 예제에서는 클래스에서 직접 또는 간접적으로 파생된 클래스가 Control 있어야 합니다.

protected:
   virtual void SetBoundsCore( int x, int y, int width, int height, BoundsSpecified specified ) override
   {
      // Set a fixed height and width for the control.
      UserControl::SetBoundsCore( x, y, 150, 75, specified );
   }
protected override void SetBoundsCore(int x, int y, 
   int width, int height, BoundsSpecified specified)
{
   // Set a fixed height and width for the control.
   base.SetBoundsCore(x, y, 150, 75, specified);
}
Protected Overrides Sub SetBoundsCore(x As Integer, _
  y As Integer, width As Integer, _
  height As Integer, specified As BoundsSpecified)
   ' Set a fixed height and width for the control.
   MyBase.SetBoundsCore(x, y, 150, 75, specified)
End Sub

설명

일반적으로 매개 변수에 포함되지 specified 않은 경계에 해당하는 매개 변수는 현재 값으로 전달됩니다. 예를 들어 컨트롤의 Height현재 인스턴스에 X Y 대한 참조를 사용하여 속성의 Location 또는 Width속성을 전달할 수 있습니다. 그러나 전달된 모든 값은 적용되고 컨트롤에 적용됩니다.

합니다 boundsSpecified 매개 변수는 컨트롤의 요소를 나타냅니다 Bounds 애플리케이션에서 변경 합니다. 예를 들어 컨트롤을 Size 변경하는 경우 매개 변수 값은 .의 BoundsSpecified값입니다Size.boundsSpecified 그러나 설정 boundsSpecified 되는 속성에 대한 응답으로 Dock 조정되는 경우 Size 매개 변수 값은 .의 BoundsSpecified값입니다None.

참고

Windows Server 2003 시스템에서는 모니터의 Form 최대 픽셀 너비와 높이에 따라 크기가 제한됩니다.

상속자 참고

파생 클래스에서 재정 SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 의하는 경우 기본 클래스의 SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 메서드를 호출하여 컨트롤의 경계를 강제로 변경해야 합니다. 파생 클래스는 메서드에 크기 제한을 SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 추가할 수 있습니다.

적용 대상

추가 정보