SystemPens.Desktop 속성

정의

Windows 바탕 화면의 색인 Pen을 가져옵니다.Gets a Pen that is the color of the Windows desktop.

public:
 static property System::Drawing::Pen ^ Desktop { System::Drawing::Pen ^ get(); };
public static System.Drawing.Pen Desktop { get; }
member this.Desktop : System.Drawing.Pen
Public Shared ReadOnly Property Desktop As Pen

속성 값

Pen

Windows 바탕 화면의 색인 Pen입니다.A Pen that is the color of the Windows desktop.

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 Desktop 속성입니다.The following code example demonstrates how to use the Desktop property. 이 예제를 실행 하려면 Windows 폼에 붙여 넣습니다.To run this example, paste it into a Windows Form. 양식의 처리 Paint 이벤트 및 호출 합니다 DrawWithControlDesktopPen 메서드에서 Paint 전달 하는 이벤트 처리 메서드를 e 으로 PaintEventArgs입니다.Handle the form's Paint event and call the DrawWithControlDesktopPen method from the Paint event-handling method, passing e as PaintEventArgs.

private void DrawWithControlDesktopPen(PaintEventArgs e)
{
    Rectangle rectangle1 = new Rectangle(10, 10, 100, 100);
    e.Graphics.DrawRectangle(SystemPens.Desktop, rectangle1);
}
Private Sub DrawWithControlDesktopPen(ByVal e As PaintEventArgs) 
    Dim rectangle1 As New Rectangle(10, 10, 100, 100)
    e.Graphics.DrawRectangle(SystemPens.Desktop, rectangle1)

End Sub

적용 대상