KnownColor 列挙体とは? わかりやすく解説

KnownColor 列挙体

既知システム カラー指定します

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

public enum KnownColor
public enum class KnownColor
public enum KnownColor
public enum KnownColor
メンバメンバ
 メンバ説明
ActiveBorderアクティブウィンドウ境界線システム定義色。 
ActiveCaptionアクティブウィンドウタイトル バー背景システム定義色。 
ActiveCaptionTextアクティブウィンドウタイトル バーテキストシステム定義色。 
AliceBlueシステム定義色。 
AntiqueWhiteシステム定義色。 
AppWorkspaceアプリケーション作業領域システム定義色。アプリケーション作業領域とは、ドキュメント使用されていないマルチ ドキュメント ビュー領域のことです。 
Aquaシステム定義色。 
Aquamarineシステム定義色。 
Azureシステム定義色。 
Beigeシステム定義色。 
Bisqueシステム定義色。 
Blackシステム定義色。 
BlanchedAlmondシステム定義色。 
Blueシステム定義色。 
BlueVioletシステム定義色。 
Brownシステム定義色。 
BurlyWoodシステム定義色。 
ButtonFace3D 要素表面システム定義色。 
ButtonHighlight3D 要素強調表示カラーを表すシステム定義色。この色が、光源面している 3D 要素部分適用されます。 
ButtonShadow3D 要素の影の色を表すシステム定義色。この色は、光源反対側にある 3D 要素部分適用されます。 
CadetBlueシステム定義色。 
Chartreuseシステム定義色。 
Chocolateシステム定義色。 
Control3D 要素表面システム定義色。 
ControlDark3D 要素の影のシステム定義色。影の色は、光源反対側にある 3D 要素部分的に適用されます。 
ControlDarkDark3D 要素暗い影の色を表すシステム定義色。暗い影の色が、最も暗い色の 3D 要素部分適用されます。 
ControlLight3D 要素明るい色を表すシステム定義色。明るい色が、光源面している 3D 要素部分適用されます。 
ControlLightLight3D 要素強調表示システム定義色。強調表示カラーが、最も明るい色の 3D 要素部分適用されます。 
ControlText3D 要素テキストシステム定義色。 
Coralシステム定義色。 
CornflowerBlueシステム定義色。 
Cornsilkシステム定義色。 
Crimsonシステム定義色。 
Cyanシステム定義色。 
DarkBlueシステム定義色。 
DarkCyanシステム定義色。 
DarkGoldenrodシステム定義色。 
DarkGrayシステム定義色。 
DarkGreenシステム定義色。 
DarkKhakiシステム定義色。 
DarkMagentaシステム定義色。 
DarkOliveGreenシステム定義色。 
DarkOrangeシステム定義色。 
DarkOrchidシステム定義色。 
DarkRedシステム定義色。 
DarkSalmonシステム定義色。 
DarkSeaGreenシステム定義色。 
DarkSlateBlueシステム定義色。 
DarkSlateGrayシステム定義色。 
DarkTurquoiseシステム定義色。 
DarkVioletシステム定義色。 
DeepPinkシステム定義色。 
DeepSkyBlueシステム定義色。 
Desktopデスクトップシステム定義色。 
DimGrayシステム定義色。 
DodgerBlueシステム定義色。 
Firebrickシステム定義色。 
FloralWhiteシステム定義色。 
ForestGreenシステム定義色。 
Fuchsiaシステム定義色。 
Gainsboroシステム定義色。 
GhostWhiteシステム定義色。 
Goldシステム定義色。 
Goldenrodシステム定義色。 
GradientActiveCaptionアクティブウィンドウタイトル バー適用される色のグラデーションにおいて最も明るい色のシステム定義色。 
GradientInactiveCaptionアクティブでないウィンドウタイトル バー適用される色のグラデーションにおいて最も明るい色のシステム定義色。  
Grayシステム定義色。 
GrayText淡色テキストシステム定義色。リスト内の無効の項目は、淡色テキスト表示されます。 
Greenシステム定義色。 
GreenYellowシステム定義色。 
Highlight選択した項目の背景システム定義色。これには、選択したメニュー項目と選択したテキストが必要です。  
HighlightText選択した項目のテキストシステム定義色。 
Honeydewシステム定義色。 
HotPinkシステム定義色。 
HotTrackホット トラッキング項目の指定使用するシステム定義色。ホット トラッキング項目は、シングルクリックして実行します。 
InactiveBorderアクティブでないウィンドウ境界線システム定義色。 
InactiveCaptionアクティブでないウィンドウタイトル バー背景システム定義色。 
InactiveCaptionTextアクティブでないウィンドウタイトル バーテキストシステム定義色。 
IndianRedシステム定義色。 
Indigoシステム定義色。 
Infoツールヒント背景システム定義色。 
InfoTextツールヒントテキストシステム定義色。 
Ivoryシステム定義色。 
Khakiシステム定義色。 
Lavenderシステム定義色。 
LavenderBlushシステム定義色。 
LawnGreenシステム定義色。 
LemonChiffonシステム定義色。 
LightBlueシステム定義色。 
LightCoralシステム定義色。 
LightCyanシステム定義色。 
LightGoldenrodYellowシステム定義色。 
LightGrayシステム定義色。 
LightGreenシステム定義色。 
LightPinkシステム定義色。 
LightSalmonシステム定義色。 
LightSeaGreenシステム定義色。 
LightSkyBlueシステム定義色。 
LightSlateGrayシステム定義色。 
LightSteelBlueシステム定義色。 
LightYellowシステム定義色。 
Limeシステム定義色。 
LimeGreenシステム定義色。 
Linenシステム定義色。 
Magentaシステム定義色。 
Maroonシステム定義色。 
MediumAquamarineシステム定義色。 
MediumBlueシステム定義色。 
MediumOrchidシステム定義色。 
MediumPurpleシステム定義色。 
MediumSeaGreenシステム定義色。 
MediumSlateBlueシステム定義色。 
MediumSpringGreenシステム定義色。 
MediumTurquoiseシステム定義色。 
MediumVioletRedシステム定義色。 
Menuメニュー背景システム定義色。 
MenuBarメニュー バー背景システム定義色。 
MenuHighlightメニューフラット メニューとして表示するときにメニュー項目の強調表示使用されるシステム定義色。 
MenuTextメニューテキストシステム定義色。 
MidnightBlueシステム定義色。 
MintCreamシステム定義色。 
MistyRoseシステム定義色。 
Moccasinシステム定義色。 
NavajoWhiteシステム定義色。 
Navyシステム定義色。 
OldLaceシステム定義色。 
Oliveシステム定義色。 
OliveDrabシステム定義色。 
Orangeシステム定義色。 
OrangeRedシステム定義色。 
Orchidシステム定義色。 
PaleGoldenrodシステム定義色。 
PaleGreenシステム定義色。 
PaleTurquoiseシステム定義色。 
PaleVioletRedシステム定義色。 
PapayaWhipシステム定義色。 
PeachPuffシステム定義色。 
Peruシステム定義色。 
Pinkシステム定義色。 
Plumシステム定義色。 
PowderBlueシステム定義色。 
Purpleシステム定義色。 
Redシステム定義色。 
RosyBrownシステム定義色。 
RoyalBlueシステム定義色。 
SaddleBrownシステム定義色。 
Salmonシステム定義色。 
SandyBrownシステム定義色。 
ScrollBarスクロール バー背景システム定義色。 
SeaGreenシステム定義色。 
SeaShellシステム定義色。 
Siennaシステム定義色。 
Silverシステム定義色。 
SkyBlueシステム定義色。 
SlateBlueシステム定義色。 
SlateGrayシステム定義色。 
Snowシステム定義色。 
SpringGreenシステム定義色。 
SteelBlueシステム定義色。 
Tanシステム定義色。 
Tealシステム定義色。 
Thistleシステム定義色。 
Tomatoシステム定義色。 
Transparentシステム定義色。 
Turquoiseシステム定義色。 
Violetシステム定義色。 
Wheatシステム定義色。 
Whiteシステム定義色。 
WhiteSmokeシステム定義色。 
Windowウィンドウクライアント領域背景システム定義色。 
WindowFrameウィンドウシステム定義色。 
WindowTextウィンドウクライアント領域テキストシステム定義色。 
Yellowシステム定義色。 
YellowGreenシステム定義色。 
使用例使用例

KnownColor 列挙体を使用してすべての値の名前および色を印刷する方法方法次のコード例示します。この例は、Windows フォームでの使用意図してデザインされています。フォーム作成し次のコード貼り付けます。フォームPaint イベント処理メソッドDisplayKnownColors メソッド呼び出しe を PaintEventArgs として渡します

Private Sub DisplayKnownColors(ByVal
 e As PaintEventArgs)
    Me.Size = New Size(650, 550)
    Dim i As Integer

    ' Get all the values from the KnownColor enumeration.
    Dim colorsArray As System.Array = _
        [Enum].GetValues(GetType(KnownColor))
    Dim allColors(colorsArray.length) As KnownColor

    Array.Copy(colorsArray, allColors, colorsArray.Length)

    ' Loop through printing out the value's name in the colors 
    ' they represent.
    Dim y As Single
    Dim x As Single = 10.0F

    For i = 0 To allColors.Length - 1

        ' If x is a multiple of 30, start a new column.
        If (i > 0 And i Mod
 30 = 0) Then
            x += 105.0F
            y = 15.0F
        Else
            ' Otherwise increment y by 15.
            y += 15.0F
        End If

        ' Create a custom brush from the color and use it to draw
        ' the brush's name.
        Dim aBrush As New
 SolidBrush(Color.FromName( _
            allColors(i).ToString()))
        e.Graphics.DrawString(allColors(i).ToString(), _
            Me.Font, aBrush, x, y)

        ' Dispose of the custom brush.
        aBrush.Dispose()
    Next

End Sub
private void DisplayKnownColors(PaintEventArgs
 e)
{
    this.Size = new Size(650, 550);
    
    // Get all the values from the KnownColor enumeration.
    System.Array colorsArray = Enum.GetValues(typeof(KnownColor));
    KnownColor[] allColors = new KnownColor[colorsArray.Length];

    Array.Copy(colorsArray, allColors, colorsArray.Length);

    // Loop through printing out the values' names in the colors 
    // they represent.
    float y = 0;
    float x = 10.0F;

    for(int i = 0; i < allColors.Length;
 i++)
    {

        // If x is a multiple of 30, start a new column.
        if (i > 0 && i % 30 == 0)
        {
            x += 105.0F;
            y = 15.0F;
        }
        else
        {
            // Otherwise, increment y by 15.
            y += 15.0F;
        }

        // Create a custom brush from the color and use it to draw
        // the brush's name.
        SolidBrush aBrush = 
            new SolidBrush(Color.FromName(allColors[i].ToString()));
        e.Graphics.DrawString(allColors[i].ToString(), 
            this.Font, aBrush, x, y);

        // Dispose of the custom brush.
        aBrush.Dispose();
    }

}
private:
   void DisplayKnownColors( PaintEventArgs^ e )
   {
      this->Size = System::Drawing::Size( 650, 550 );

      // Get all the values from the KnownColor enumeration.
      System::Array^ colorsArray = Enum::GetValues( KnownColor::typeid );
      array<KnownColor>^allColors = gcnew array<KnownColor>(colorsArray->Length);
      Array::Copy( colorsArray, allColors, colorsArray->Length );

      // Loop through printing out the values' names in the colors 
      // they represent.
      float y = 0;
      float x = 10.0F;
      for ( int i = 0; i < allColors->Length;
 i++ )
      {
         // If x is a multiple of 30, start a new column.
         if ( i > 0 && i % 30 == 0 )
         {
            x += 105.0F;
            y = 15.0F;
         }
         else
         {
            // Otherwise, increment y by 15.
            y += 15.0F;
         }

         // Create a custom brush from the color and use it to draw
         // the brush's name.
         SolidBrush^ aBrush = gcnew SolidBrush( Color::FromName( allColors[ i ].ToString()
 ) );
         e->Graphics->DrawString( allColors[ i ].ToString(), this->Font,
 aBrush, x, y );

         // Dispose of the custom brush.
         delete aBrush;
      }
   }
private void DisplayKnownColors(PaintEventArgs
 e)
{
    this.set_Size(new Size(650, 550));

    // Get all the values from the KnownColor enumeration.
    System.Array colorsArray = Enum.GetValues(KnownColor.class.ToType());
    KnownColor allColors[] = new KnownColor[colorsArray.get_Length()];

    Array.Copy(colorsArray, allColors, colorsArray.get_Length());

    // Loop through printing out the values' names in the colors 
    // they represent.
    float y = 0;
    float x = 10;

    for (int i = 0; i < allColors.length;
 i++) {
        // If x is a multiple of 30, start a new column.
        if (i > 0 && i % 30 == 0) {
            x += 105;
            y = 15;
        }
        else {
            // Otherwise, increment y by 15.
            y += 15;
        }

        // Create a custom brush from the color and use it to draw
        // the brush's name.
        SolidBrush aBrush = new SolidBrush(Color.FromName(
            allColors.get_Item(i).ToString()));

        e.get_Graphics().DrawString(allColors.get_Item(i).ToString(),
            this.get_Font(), aBrush, x, y);

        // Dispose of the custom brush.
        aBrush.Dispose();
    }
} //DisplayKnownColors
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からKnownColor 列挙体を検索した結果を表示しています。
Weblioに収録されているすべての辞書からKnownColor 列挙体を検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からKnownColor 列挙体を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「KnownColor 列挙体」の関連用語

KnownColor 列挙体のお隣キーワード
検索ランキング

   

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



KnownColor 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS