Information.QBColor(Int32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an Integer
value representing the RGB color code corresponding to the specified color number.
public:
static int QBColor(int Color);
public static int QBColor(int Color);
static member QBColor : int -> int
Public Function QBColor (Color As Integer) As Integer
- Color
- Int32
Required. A whole number in the range 0-15.
Returns an Integer
value representing the RGB color code corresponding to the specified color number.
Color
is outside of range 0 to 15, inclusive.
This example uses the QBColor
function to change to the color indicated by colorInteger
. QBColor
accepts integer values between 0 and 15.
Dim colorInteger As Integer
' Use 4 for red.
colorInteger = QBColor(4)
Starting with the least-significant byte, the returned value specifies the red, green, and blue values used to set the appropriate color in the RGB system used by the Visual Basic language.
The Color
argument has these settings.
Number | Color | Number | Color |
---|---|---|---|
0 | Black | 8 | Gray |
1 | Blue | 9 | Light blue |
2 | Green | 10 | Light green |
3 | Cyan | 11 | Light cyan |
4 | Red | 12 | Light red |
5 | Magenta | 13 | Light magenta |
6 | Yellow | 14 | Light yellow |
7 | White | 15 | Bright white |
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: