Språk

ColorBuilder.BuildColor(IComponent, Control, String) Metod

Definition

Startar en färgredigerare för att skapa ett HTML-färgegenskapsvärde.

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

Parametrar

component
IComponent

Vars IComponent webbplats ska användas för att få åtkomst till designtidstjänster.

owner
Control

Det Control som används för att överordna väljarens fönster.

initialColor
String

Den första färgen som ska visas i väljarens fönster, i ett giltigt HTML-färgformat.

Returer

Färgvärdet, som representeras som en sträng i ett HTML-färgformat, eller null om byggtjänsten inte kunde hämtas.

Exempel

// 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")

Kommentarer

Den returnerade strängen, om den inte nullär , anger en färg i ett giltigt HTML-färgformat. Giltiga format innehåller namngivna färger och färgkoder i RGB-format (#RRGGBB).

Gäller för