Screen.GetWorkingArea 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
디스플레이의 작업 영역을 검색합니다.
오버로드
| Name | Description |
|---|---|
| GetWorkingArea(Point) |
지정된 지점에 가장 가까운 작업 영역을 검색합니다. 작업 영역은 작업 표시줄, 도킹된 창 및 도킹된 도구 모음을 제외한 디스플레이의 바탕 화면 영역입니다. |
| GetWorkingArea(Rectangle) |
지정된 사각형의 가장 큰 부분을 포함하는 디스플레이의 작업 영역을 검색합니다. 작업 영역은 작업 표시줄, 도킹된 창 및 도킹된 도구 모음을 제외한 디스플레이의 바탕 화면 영역입니다. |
| GetWorkingArea(Control) |
지정된 컨트롤의 가장 큰 영역을 포함하는 디스플레이의 작업 영역을 검색합니다. 작업 영역은 작업 표시줄, 도킹된 창 및 도킹된 도구 모음을 제외한 디스플레이의 바탕 화면 영역입니다. |
GetWorkingArea(Point)
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
지정된 지점에 가장 가까운 작업 영역을 검색합니다. 작업 영역은 작업 표시줄, 도킹된 창 및 도킹된 도구 모음을 제외한 디스플레이의 바탕 화면 영역입니다.
public:
static System::Drawing::Rectangle GetWorkingArea(System::Drawing::Point pt);
public static System.Drawing.Rectangle GetWorkingArea(System.Drawing.Point pt);
static member GetWorkingArea : System.Drawing.Point -> System.Drawing.Rectangle
Public Shared Function GetWorkingArea (pt As Point) As Rectangle
매개 변수
반환
작업 영역을 지정하는 A Rectangle 입니다. 지정된 점을 포함하는 디스플레이가 없는 여러 디스플레이 환경에서는 점과 가장 가까운 디스플레이가 반환됩니다.
예제
다음 코드 예제에서는 속성 및 메서드의 PrimaryScreen 사용을 보여 줍니다 GetWorkingArea . 이 메서드에는 이름이 지정된 단추가 포함된 양식이 필요합니다. Button1
// This method will adjust the size of the form to utilize
// the working area of the screen.
private:
void Button1_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
// Retrieve the working rectangle from the Screen class
// using the PrimaryScreen and the WorkingArea properties.
System::Drawing::Rectangle workingRectangle = Screen::PrimaryScreen->WorkingArea;
// Set the size of the form slightly less than size of
// working rectangle.
this->Size = System::Drawing::Size( workingRectangle.Width - 10, workingRectangle.Height - 10 );
// Set the location so the entire form is visible.
this->Location = System::Drawing::Point( 5, 5 );
}
// This method will adjust the size of the form to utilize
// the working area of the screen.
private void Button1_Click(System.Object sender, System.EventArgs e)
{
// Retrieve the working rectangle from the Screen class
// using the PrimaryScreen and the WorkingArea properties.
System.Drawing.Rectangle workingRectangle =
Screen.PrimaryScreen.WorkingArea;
// Set the size of the form slightly less than size of
// working rectangle.
this.Size = new System.Drawing.Size(
workingRectangle.Width-10, workingRectangle.Height-10);
// Set the location so the entire form is visible.
this.Location = new System.Drawing.Point(5, 5);
}
' This method will adjust the size of the form to utilize
' the working area of the screen.
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
' Retrieve the working rectangle from the Screen class
' using the PrimaryScreen and the WorkingArea properties.
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea
' Set the size of the form slightly less than size of
' working rectangle.
Me.Size = New System.Drawing.Size(workingRectangle.Width - 10, _
workingRectangle.Height - 10)
' Set the location so the entire form is visible.
Me.Location = New System.Drawing.Point(5, 5)
End Sub
적용 대상
GetWorkingArea(Rectangle)
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
지정된 사각형의 가장 큰 부분을 포함하는 디스플레이의 작업 영역을 검색합니다. 작업 영역은 작업 표시줄, 도킹된 창 및 도킹된 도구 모음을 제외한 디스플레이의 바탕 화면 영역입니다.
public:
static System::Drawing::Rectangle GetWorkingArea(System::Drawing::Rectangle rect);
public static System.Drawing.Rectangle GetWorkingArea(System.Drawing.Rectangle rect);
static member GetWorkingArea : System.Drawing.Rectangle -> System.Drawing.Rectangle
Public Shared Function GetWorkingArea (rect As Rectangle) As Rectangle
매개 변수
반환
작업 영역을 지정하는 A Rectangle 입니다. 지정된 사각형을 포함하는 디스플레이가 없는 여러 디스플레이 환경에서는 사각형에 가장 가까운 디스플레이가 반환됩니다.
적용 대상
GetWorkingArea(Control)
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
지정된 컨트롤의 가장 큰 영역을 포함하는 디스플레이의 작업 영역을 검색합니다. 작업 영역은 작업 표시줄, 도킹된 창 및 도킹된 도구 모음을 제외한 디스플레이의 바탕 화면 영역입니다.
public:
static System::Drawing::Rectangle GetWorkingArea(System::Windows::Forms::Control ^ ctl);
public static System.Drawing.Rectangle GetWorkingArea(System.Windows.Forms.Control ctl);
static member GetWorkingArea : System.Windows.Forms.Control -> System.Drawing.Rectangle
Public Shared Function GetWorkingArea (ctl As Control) As Rectangle
매개 변수
반환
작업 영역을 지정하는 A Rectangle 입니다. 지정된 컨트롤을 포함하는 디스플레이가 없는 여러 디스플레이 환경에서는 컨트롤에 가장 가까운 디스플레이가 반환됩니다.