Name
ColorDialog Class
Namespace
System.Windows.Forms
Createable
Yes
Description
Represents a common dialog box for selecting a color.
The ColorDialog object has properties for setting the initial appearance and functionality of the color dialog box, a property for returning the color selected by the user, and a method for showing the dialog box.
Selected ColorDialog Members
The following provides a brief description of the more important members of the ColorDialog class:
- AllowFullOpen property
Returns or sets a Boolean value indicating whether the user can use the dialog box to define custom colors. The default is
True
.- AnyColor property
Returns or sets a Boolean value indicating whether the dialog box displays all available colors, although in Beta 2 of VB .NET, this property seems to have no effect. The default is
False
.- Color property
Returns an instance of a Color structure, which contains information about the color selected by the user. The Color structure, which is a type belonging to the System.Drawing namespace, has a number of members, among which are:
Over 140 named color properties, from Red, Green, and Blue, to PapayaWhip, MistyRose, and MediumSeagreen. These properties return a Color structure.
The Name property, which returns the name of the color, or its ARGB value for custom colors. (The A component is the alpha component of the color, which determines the color’s opacity.)
The R property, G property, and B property, which return a byte specifying the red, green, or ...
Get VB .NET Language in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.