QBColor Function

Returns the RGB color code of the color passed as a color value through an older MS-DOS based programming system.

Syntax:

QBColor (ColorNumber As Integer)

рд╡рд╛рдкрд╕реА рдореВрд▓реНрдп:

Long

рдкреИрд░рд╛рдореАрдЯрд░

ColorNumber: Any integer expression that specifies the color value of the color passed from an older MS-DOS based programming system.

ColorNumber can be assigned the following values:

0 : рдХрд╛рд▓рд╛

1: рдиреАрд▓рд╛

2 : рд╣рд░рд╛

3 : рдХреНрдпрд╛рди

4 : рд▓рд╛рд▓

5 : рдордЬреЗрдВрдЯрд╛

6 : рдкреАрд▓рд╛

7 : рд╕рдлреЗрдж

7 : рдзреВрд╕рд░

9 : Light Blue

10 : Light Green

11 : Light Cyan

12 : Light Red

13 : Light Magenta

14 : Light Yellow

15 : Bright White

This function is used only to convert from older MS-DOS based BASIC applications that use the above color codes. The function returns a long integer value indicating the color to be used in the LibreOffice IDE.

Error codes:

5 Invalid procedure call

рдЙрджрд╛рд╣рд░рдг:


Sub ExampleQBColor
Dim iColor As Integer
Dim sText As String
    iColor = 7
    sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) )
    MsgBox stext,0,"Color " & iColor
End Sub