SystemIconsとは? わかりやすく解説

SystemIcons クラス

SystemIcons クラスの各プロパティは、Windows のシステム全体のアイコンの Icon オブジェクトです。このクラスは継承できません。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public NotInheritable Class
 SystemIcons
public sealed class SystemIcons
public ref class SystemIcons sealed
public final class SystemIcons
使用例使用例

GraphicsUnit 列挙体を使用して、ビットマップを Icon ハンドルから読み込み、Round メソッドを使用して、ビットマップの外接する四角形を描画するコード例を次に示します。

この例は、Windows フォームでの使用を意図してデザインされています。Button2 という名前のボタンを格納するフォームを作成します。コードをフォームに貼り付け、このメソッドをボタンの Click イベントに関連付けます。

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
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();
}
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.get_Hand().get_Handle());
    Graphics formGraphics = this.CreateGraphics();
    GraphicsUnit units = GraphicsUnit.Point;
    RectangleF bmpRectangleF = bitmap1.GetBounds(units);
    Rectangle bmpRectangle = Rectangle.Round(bmpRectangleF);

    formGraphics.DrawRectangle(Pens.get_Blue(), bmpRectangle);
    formGraphics.Dispose();
} //button2_Click
継承階層継承階層
System.Object
  System.Drawing.SystemIcons
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

SystemIcons プロパティ


SystemIcons メソッド


SystemIcons メンバ

SystemIcons クラスの各プロパティは、Windows のシステム全体のアイコンの Icon オブジェクトです。このクラスは継承できません。

SystemIcons データ型で公開されるメンバを以下の表に示します。


パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SystemIcons クラス
System.Drawing 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「SystemIcons」の関連用語

SystemIconsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SystemIconsのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS