HTML カラー プロパティ値をビルドするために、カラー エディタを起動します。
Public Shared Function BuildColor( _
ByVal component As IComponent, _ ByVal owner As Control, _ ByVal initialColor As String _) As String
[C#]
public static string BuildColor(IComponentcomponent,Controlowner,stringinitialColor);
[C++]
public: static String* BuildColor(IComponent* component,Control* owner,String* initialColor);
[JScript]
public static function BuildColor(
component : IComponent,owner : Control,initialColor : String) : String;
パラメータ
- component
デザイン時サービスにアクセスするために使用するサイトを持つ IComponent 。 - owner
ピッカー ウィンドウの親として使用される Control 。 - initialColor
有効な HTML カラー形式でピッカー ウィンドウに表示される初期設定の色。
戻り値
HTML カラー形式の文字列として表されるカラー値、またはビルダ サービスが取得できなかった場合は null 参照 (Visual Basic では Nothing) 。
解説
返された文字列。 null 参照 (Visual Basic では Nothing) 以外の場合は、有効な HTML カラー形式の色を示します。有効な形式には、名前付きの色および RGB 形式 (#RRGGBB) のカラー コードが含まれます。
使用例
' Create a parent control.
Dim c As New System.Windows.Forms.Control()
c.CreateControl()
' Launch the Color Builder using the specified control
' parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(Me.Component, c, "405599")
[C#]
// Create a parent control.
System.Windows.Forms.Control c = new System.Windows.Forms.Control();
c.CreateControl();
// Launch the Color Builder using the specified control
// parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(this.Component, c, "405599");
[C++]
// Create a parent control.
System::Windows::Forms::Control* c = new System::Windows::Forms::Control();
c->CreateControl();
// Launch the Color Builder using the specified control
// parent and an initial HTML format (S"RRGGBB") color String*.
System::Web::UI::Design::ColorBuilder::BuildColor(this->Component, c, S"405599");
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- 直前の呼び出し元の完全信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細の参照先 : 部分信頼コードからのライブラリの使用
参照
ColorBuilder クラス | ColorBuilder メンバ | System.Web.UI.Design 名前空間