QBColor Function

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

Sintakse:

QBColor (ColorNumber As Integer)

Atgrieztā vērtība:

Long

Parametrs:

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 : Melns

1 : Zils

2 : Zaļš

3 : Ciāns

4 : Sarkans

5 : Fuksīns

6 : Dzeltens

7 : Balts

8 : Pelēks

9 : Gaiši zils

10 : Gaiši zaļš

11 : Gaiši ciāns

12 : Gaiši sarkans

13 : Fuksīna rozā

14 : Gaiši dzeltens

15 : Koši balts

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 Nederīgs procedūras izsaukums

Piemērs:

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