Form.ClientSize 속성

정의

폼의 클라이언트 영역 크기를 가져오거나 설정합니다.

public:
 property System::Drawing::Size ClientSize { System::Drawing::Size get(); void set(System::Drawing::Size value); };
public System.Drawing.Size ClientSize { get; set; }
member this.ClientSize : System.Drawing.Size with get, set
Public Property ClientSize As Size

속성 값

폼의 클라이언트 영역 크기를 나타내는 Size입니다.

예제

다음 예제에서는 폼의 이벤트에 대한 Resize 이벤트 처리기를 만듭니다. 이벤트 처리기는 폼의 속성을 사용하여 ClientSize 라는 button1 컨트롤이 Button 양식의 전체 클라이언트 영역을 채우도록 합니다.

private:
   void MyForm_Resize( Object^ sender, EventHandler^ e )
   {
      // Set the size of button1 to the size of the client area of the form.
      button1->Size = this->ClientSize;
   }
private void MyForm_Resize (Object sender, EventHandler e)
 {
    // Set the size of button1 to the size of the client area of the form.
    button1.Size = this.ClientSize;
 }
Private Sub MyForm_Resize(sender As Object, e As EventHandler)
    ' Set the size of button1 to the size of the client area of the form.
    button1.Size = Me.ClientSize
End Sub

설명

양식의 클라이언트 영역 크기는 테두리와 제목 표시줄을 제외한 폼의 크기입니다. 폼의 클라이언트 영역은 컨트롤을 배치할 수 있는 폼 내의 영역입니다. 그래픽 작업을 수행하거나 폼에서 컨트롤의 크기를 조정하고 배치할 때 이 속성을 사용하여 적절한 차원을 가져올 수 있습니다. 전체 양식의 크기를 얻으려면 속성을 사용 Size 하거나 개별 속성 HeightWidth를 사용합니다.

참고

현재 애플리케이션 설정을 사용 하 여이 속성에 바인딩할 수 없습니다. 애플리케이션 설정에 대 한 자세한 내용은 참조 하세요. 애플리케이션 설정 개요합니다.

적용 대상

추가 정보