SystemBrushes 클래스

정의

SystemBrushes 클래스의 각 속성은 Windows 표시 요소의 색인 SolidBrush입니다.

public ref class SystemBrushes abstract sealed
public ref class SystemBrushes sealed
public static class SystemBrushes
public sealed class SystemBrushes
type SystemBrushes = class
Public Class SystemBrushes
Public NotInheritable Class SystemBrushes
상속
SystemBrushes

예제

다음 코드 예제를 사용 하 여 바로 가기 키를 설정 하는 방법을 보여 주세요는 HotkeyPrefix 속성입니다. 또한 메서드를 사용하는 방법을 보여 줍니다 FromSystemColor . 이 예제를 실행하려면 코드를 양식에 붙여넣고 폼의 Paint 이벤트를 처리한 다음 다음 메서드를 호출하여 으로 PaintEventArgs전달 e 합니다.

private:
   void ShowHotKey( PaintEventArgs^ e )
   {
      // Declare the string with a keyboard shortcut.
      String^ text = "&Click Here";

      // Declare a new StringFormat.
      StringFormat^ format = gcnew StringFormat;

      // Set the HotkeyPrefix property.
      format->HotkeyPrefix = System::Drawing::Text::HotkeyPrefix::Show;

      // Draw the string.
      Brush^ theBrush = SystemBrushes::FromSystemColor( SystemColors::Highlight );
      e->Graphics->DrawString( text, this->Font, theBrush, 30, 40, format );
   }
private void ShowHotKey(PaintEventArgs e)
{

    // Declare the string with a keyboard shortcut.
    string text = "&Click Here";

    // Declare a new StringFormat.
    StringFormat format = new StringFormat();

    // Set the HotkeyPrefix property.
    format.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show;

    // Draw the string.
    Brush theBrush = 
        SystemBrushes.FromSystemColor(SystemColors.Highlight);

    e.Graphics.DrawString(text, this.Font, theBrush, 30, 40, format);
}
Private Sub ShowHotKey(ByVal e As PaintEventArgs)

    ' Declare the string with keyboard shortcut.
    Dim text As String = "&Click Here"

    ' Declare a new StringFormat.
    Dim format As New StringFormat

    ' Set the HotkeyPrefix property.
    format.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show

    ' Draw the string.
    Dim theBrush As Brush = _
        SystemBrushes.FromSystemColor(SystemColors.Highlight)
    e.Graphics.DrawString(text, Me.Font, theBrush, 30, 40, format)
End Sub

설명

참고

.NET 6 이상 버전에서는 이 형식을 포함하는 System.Drawing.Common 패키지가 Windows 운영 체제에서만 지원됩니다. 플랫폼 간 앱에서 이 형식을 사용하면 컴파일 시간 경고 및 런타임 예외가 발생합니다. 자세한 내용은 Windows에서만 지원되는 System.Drawing.Common을 참조하세요.

속성

ActiveBorder

활성 창의 테두리 색인 SolidBrush을 가져옵니다.

ActiveCaption

활성 창 제목 표시줄의 배경색인 SolidBrush를 가져옵니다.

ActiveCaptionText

활성 창의 제목 표시줄에 있는 텍스트의 색인 SolidBrush를 가져옵니다.

AppWorkspace

애플리케이션 작업 공간의 색인 SolidBrush를 가져옵니다.

ButtonFace

3차원 요소의 표면 색인 SolidBrush을 가져옵니다.

ButtonHighlight

3차원 요소의 강조 색인 SolidBrush을 가져옵니다.

ButtonShadow

3차원 요소의 그림자 색인 SolidBrush을 가져옵니다.

Control

3차원 요소의 표면 색인 SolidBrush을 가져옵니다.

ControlDark

3차원 요소의 그림자 색인 SolidBrush을 가져옵니다.

ControlDarkDark

3차원 요소의 짙은 그림자 색인 SolidBrush을 가져옵니다.

ControlLight

3차원 요소의 옅은 색인 SolidBrush을 가져옵니다.

ControlLightLight

3차원 요소의 강조 색인 SolidBrush을 가져옵니다.

ControlText

3차원 요소의 텍스트 색인 SolidBrush을 가져옵니다.

Desktop

바탕 화면의 색인 SolidBrush를 가져옵니다.

GradientActiveCaption

활성 창 제목 표시줄의 색 그라데이션에서 가장 옅은 색인 SolidBrush을 가져옵니다.

GradientInactiveCaption

비활성 창 제목 표시줄의 색 그라데이션에서 가장 옅은 색인 SolidBrush을 가져옵니다.

GrayText

흐리게 표시되는 텍스트 색인 SolidBrush을 가져옵니다.

Highlight

선택한 항목의 배경색인 SolidBrush을 가져옵니다.

HighlightText

선택된 항목의 텍스트 색인 SolidBrush를 가져옵니다.

HotTrack

핫 트랙 항목을 지정하는 데 사용하는 색인 SolidBrush를 가져옵니다.

InactiveBorder

비활성 창의 테두리 색인 SolidBrush를 가져옵니다.

InactiveCaption

비활성 창 제목 표시줄의 배경색인 SolidBrush를 가져옵니다.

InactiveCaptionText

비활성 창 제목 표시줄의 텍스트 색인 SolidBrush을 가져옵니다.

Info

도구 설명의 배경색인 SolidBrush을 가져옵니다.

InfoText

도구 설명의 텍스트 색인 SolidBrush을 가져옵니다.

Menu

메뉴의 배경색인 SolidBrush을 가져옵니다.

MenuBar

메뉴 모음의 배경색인 SolidBrush을 가져옵니다.

MenuHighlight

메뉴가 기본 메뉴로 표시될 때 메뉴 항목을 강조 표시하는 데 사용되는 색인 SolidBrush을 가져옵니다.

MenuText

메뉴의 텍스트 색인 SolidBrush을 가져옵니다.

ScrollBar

스크롤 막대의 배경색인 SolidBrush을 가져옵니다.

Window

창의 클라이언트 영역 배경색인 SolidBrush을 가져옵니다.

WindowFrame

창 프레임의 색인 SolidBrush을 가져옵니다.

WindowText

창의 클라이언트 영역에 있는 텍스트 색인 SolidBrush을 가져옵니다.

메서드

FromSystemColor(Color)

지정된 Brush 구조체에서 Color를 만듭니다.

적용 대상