Share via


SystemIcons Sınıf

Tanım

sınıfının her özelliği SystemIcons , Windows sistem genelindeki simgeler için bir Icon nesnedir. Bu sınıf devralınamaz.

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
Devralma
SystemIcons

Örnekler

Aşağıdaki kod örneği, bir tanıtıcıdan Icon bit eşlem yüklemeyi, numaralandırmayı GraphicsUnit kullanmayı ve bir bit eşlem dikdörtgen sınırlarını çizmek için yönteminin kullanımını Round gösterir.

Bu örnek, Windows Forms ile kullanılacak şekilde tasarlanmıştır. Button2 adlı düğmeyi içeren bir form İçerik Oluşturucu. Kodu forma yapıştırın ve bu yöntemi düğmenin Click olayıyla ilişkilendirin.

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

Açıklamalar

Not

.NET 6 ve sonraki sürümlerde, bu türü içeren System.Drawing.Common paketi yalnızca Windows işletim sistemlerinde desteklenir. Platformlar arası uygulamalarda bu türün kullanılması derleme zamanı uyarılarına ve çalışma zamanı özel durumlarına neden olur. Daha fazla bilgi için bkz . System.Drawing.Common yalnızca Windows'ta desteklenir.

Özellikler

Application

Varsayılan uygulama simgesini içeren bir Icon nesne alır (WIN32: IDI_APPLICATION).

Asterisk

Sistem yıldız simgesini içeren bir Icon nesne alır (WIN32: IDI_ASTERISK).

Error

Sistem hata simgesini içeren bir Icon nesne alır (WIN32: IDI_ERROR).

Exclamation

Sistem ünlem simgesini içeren bir Icon nesne alır (WIN32: IDI_EXCLAMATION).

Hand

Sistem el simgesini içeren bir Icon nesne alır (WIN32: IDI_HAND).

Information

Sistem bilgileri simgesini içeren bir Icon nesne alır (WIN32: IDI_INFORMATION).

Question

Sistem sorusu simgesini içeren bir Icon nesne alır (WIN32: IDI_QUESTION).

Shield

Kalkan simgesini içeren bir Icon nesneyi alır.

Warning

Sistem uyarı simgesini içeren bir Icon nesne alır (WIN32: IDI_WARNING).

WinLogo

Windows logo simgesini içeren bir Icon nesne alır (WIN32: IDI_WINLOGO).

Yöntemler

GetStockIcon(StockIconId, Int32)

Belirtilen Windows kabuğu hisse senedi simgesini alır.

GetStockIcon(StockIconId, StockIconOptions)

Belirtilen Windows kabuğu hisse senedi simgesini alır.

Şunlara uygulanır