ColorBuilder.BuildColor Method (IComponent, Control, String)

 

Starts a color editor to build an HTML color property value.

Namespace:   System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

Public Shared Function BuildColor (
	component As IComponent,
	owner As Control,
	initialColor As String
) As String

Parameters

component
Type: System.ComponentModel.IComponent

The IComponent whose site is to be used to access design-time services.

owner
Type: System.Windows.Forms.Control

The Control used to parent the picker window.

initialColor
Type: System.String

The initial color to be shown in the picker window, in a valid HTML color format.

Return Value

Type: System.String

The color value, represented as a string in an HTML color format, or null if the builder service could not be retrieved.

The returned string, if other than null, indicates a color in a valid HTML color format. Valid formats include named colors and color codes in RGB format (#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")

.NET Framework
Available since 1.1
Return to top
Show: