BBPAD‖QBColor Function

Contents
ArCya‖

# dikqG‖QBColor Function

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

### FVEx2‖Syntax:

scoHN‖QBColor (ColorNumber As Integer)

### bBBqF‖Return type:

Long

### WADQ4‖Parameters:

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

pE9zF‖ ColorNumber can be assigned the following values:

MkEFG‖0 : Black

x6PHr‖1 : Blue

6h7uw‖2 : Green

mKb2p‖3 : Cyan

pSzse‖4 : Red

wBUxx‖5 : Magenta

AaCtB‖6 : Yellow

zAqFC‖7 : White

jynzJ‖8 : Gray

75PqY‖9 : Light Blue

Y86tG‖10 : Light Green

x3vBp‖11 : Light Cyan

JC3BK‖12 : Light Red

nFEsk‖13 : Light Magenta

4i3C6‖14 : Light Yellow

pATFo‖15 : Bright White

juTQ3‖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.

### SEjHR‖Error codes:

5 Invalid procedure call

### EFSA4‖Example:

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

Please support us!