SystemIcons 클래스

정의

SystemIcons 클래스의 각 속성은 Windows 시스템 아이콘의 Icon 개체입니다. 이 클래스는 상속될 수 없습니다.

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

예제

다음 코드 예제에서는 열거형을 사용하여 핸들에서 Icon 비트맵을 로드하는 방법과 메서드를 사용하여 GraphicsUnit 비트맵의 Round 사각형 범위를 그리는 방법을 보여 줍니다.

이 예제는 Windows Forms 사용하도록 설계되었습니다. Button2라는 단추가 포함된 폼을 Create. 코드를 양식에 붙여넣고 이 메서드를 단추의 Click 이벤트와 연결합니다.

void Button2_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   Bitmap^ bitmap1 = Bitmap::FromHicon( SystemIcons::Hand->Handle );
   Graphics^ formGraphics = this->CreateGraphics();
   GraphicsUnit units = GraphicsUnit::Point;
   RectangleF bmpRectangleF = bitmap1->GetBounds( units );
   Rectangle bmpRectangle = Rectangle::Round( bmpRectangleF );
   formGraphics->DrawRectangle( Pens::Blue, bmpRectangle );
   delete formGraphics;
}
private void Button2_Click(System.Object sender, System.EventArgs e)
{

    Bitmap bitmap1 = Bitmap.FromHicon(SystemIcons.Hand.Handle);
    Graphics formGraphics = this.CreateGraphics();
    GraphicsUnit units = GraphicsUnit.Point;

    RectangleF bmpRectangleF = bitmap1.GetBounds(ref units);
    Rectangle bmpRectangle = Rectangle.Round(bmpRectangleF);
    formGraphics.DrawRectangle(Pens.Blue, bmpRectangle);
    formGraphics.Dispose();
}
Private Sub Button2_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button2.Click

    Dim bitmap1 As Bitmap = Bitmap.FromHicon(SystemIcons.Hand.Handle)
    Dim formGraphics As Graphics = Me.CreateGraphics()
    Dim units As GraphicsUnit = GraphicsUnit.Point
    Dim bmpRectangleF As RectangleF = bitmap1.GetBounds(units)
    Dim bmpRectangle As Rectangle = Rectangle.Round(bmpRectangleF)
    formGraphics.DrawRectangle(Pens.Blue, bmpRectangle)
    formGraphics.Dispose()
End Sub

설명

참고

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

속성

Application

기본 애플리케이션 아이콘(WIN32: IDI_APPLICATION)을 포함하는 Icon 개체를 가져옵니다.

Asterisk

시스템 별표 아이콘(WIN32: IDI_ASTERISK)을 포함하는 Icon 개체를 가져옵니다.

Error

시스템 오류 아이콘(WIN32: IDI_ERROR)을 포함하는 Icon 개체를 가져옵니다.

Exclamation

시스템 느낌표 아이콘(WIN32: IDI_EXCLAMATION)을 포함하는 Icon 개체를 가져옵니다.

Hand

시스템 손 모양 아이콘(WIN32: IDI_HAND)을 포함하는 Icon 개체를 가져옵니다.

Information

시스템 정보 아이콘(WIN32: IDI_INFORMATION)을 포함하는 Icon 개체를 가져옵니다.

Question

시스템 질문 아이콘(WIN32: IDI_QUESTION)을 포함하는 Icon 개체를 가져옵니다.

Shield

방패 아이콘이 들어 있는 Icon 개체를 가져옵니다.

Warning

시스템 경고 아이콘(WIN32: IDI_WARNING)을 포함하는 Icon 개체를 가져옵니다.

WinLogo

Windows 로고 아이콘(WIN32: IDI_WINLOGO)을 포함하는 Icon 개체를 가져옵니다.

메서드

GetStockIcon(StockIconId, Int32)

지정된 Windows 셸 스톡 아이콘을 가져옵니다.

GetStockIcon(StockIconId, StockIconOptions)

지정된 Windows 셸 스톡 아이콘을 가져옵니다.

적용 대상