다음을 통해 공유


VisualStyleElement.Window.SmallCloseButton 클래스

정의

작은 창의 VisualStyleElement 단추의 각 상태에 대한 개체를 제공합니다. 이 클래스는 상속할 수 없습니다.

public: ref class VisualStyleElement::Window::SmallCloseButton abstract sealed
public static class VisualStyleElement.Window.SmallCloseButton
type VisualStyleElement.Window.SmallCloseButton = class
Public Class VisualStyleElement.Window.SmallCloseButton
상속
VisualStyleElement.Window.SmallCloseButton

예제

다음 코드 예제에서는 속성에서 반환 된 사용 하 여 VisualStyleRendererVisualStyleElement 만드는 방법을 보여 줍니다 Normal . 이 예제를 실행하려면 Windows Form에 붙여넣습니다. 양식의 Paint 이벤트를 처리하고 이벤트 처리 메서드에서 DrawVisualStyleElementWindowSmallCloseButton1 메서드를 호출 Paint 하여 다음과 같이 e전달 PaintEventArgs 합니다.

public void DrawVisualStyleElementWindowSmallCloseButton1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.Window.SmallCloseButton.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.Window.SmallCloseButton.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.Window.SmallCloseButton.Normal",
             this.Font, Brushes.Black, new Point(10, 10));
    }
    else
        e.Graphics.DrawString("This element is not defined in the current visual style.",
             this.Font, Brushes.Black, new Point(10, 10));
}
Public Sub DrawVisualStyleElementWindowSmallCloseButton1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.Window.SmallCloseButton.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.Window.SmallCloseButton.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.Window.SmallCloseButton.Normal", _
          Me.Font, Brushes.Black, New Point(10, 10))
    Else
        e.Graphics.DrawString("This element is not defined in the current visual style.", _
          Me.Font, Brushes.Black, New Point(10, 10))
    End If
End Sub

설명

클래스의 VisualStyleElement.Window.SmallCloseButton 각 속성은 도구 창과 같은 작은 창의 닫기 단추의 다른 상태에 대한 값을 반환 VisualStyleElement 합니다.

속성

Name Description
Disabled

비활성 상태의 작은 닫기 단추를 나타내는 비주얼 스타일 요소를 가져옵니다.

Hot

활성 상태의 작은 닫기 단추를 나타내는 비주얼 스타일 요소를 가져옵니다.

Normal

표준 상태의 작은 닫기 단추를 나타내는 비주얼 스타일 요소를 가져옵니다.

Pressed

누름 상태의 작은 닫기 단추를 나타내는 비주얼 스타일 요소를 가져옵니다.

적용 대상

추가 정보