ColorBuilder.BuildColor(IComponent, Control, String) Methode

Definition

Startet einen Farb-Editor zum Erstellen eines Eigenschaftswerts für eine HTML-Farbe.

public:
 static System::String ^ BuildColor(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Control ^ owner, System::String ^ initialColor);
public static string BuildColor (System.ComponentModel.IComponent component, System.Windows.Forms.Control owner, string initialColor);
static member BuildColor : System.ComponentModel.IComponent * System.Windows.Forms.Control * string -> string
Public Shared Function BuildColor (component As IComponent, owner As Control, initialColor As String) As String

Parameter

component
IComponent

Die IComponent, deren Site für den Zugriff auf Entwurfszeitdienste verwendet werden soll.

owner
Control

Das Control, das als übergeordnetes Element des Auswahlfensters verwendet werden soll.

initialColor
String

Die Ausgangsfarbe, die im Auswahlfenster in einem gültigen HTML-Farbformat angezeigt werden soll.

Gibt zurück

String

Der Farbwert in Zeichenfolgenentsprechung in einem Format für HTML-Farben oder null, wenn der Generatordienst nicht abgerufen werden konnte.

Beispiele

// Create a parent control.
System::Windows::Forms::Control^ c = gcnew 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, "405599" );
// 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");
' 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")

Hinweise

Die zurückgegebene Zeichenfolge, sofern nicht null, gibt eine Farbe in einem gültigen HTML-Farbformat an. Gültige Formate enthalten benannte Farben und Farbcodes im RGB-Format (#RRGGBB).

Gilt für