QBColor Function

āļ´āˇāļģāˇāļĢāˇ’ MS-DOS āļ´āļ¯āļąāļ¸āˇŠāˇ€āˇ” āļšāˇŠâ€āļģāļ¸āļŊāˇšāļ›āļąāļē āļ´āļ¯āˇŠāļ°āļ­āˇ’āļēāļš āˇ€āļģāˇŠāļĢ āļ…āļœāļēāļšāˇŠ āļēāˇāˇ€āˇ” āˇ€āˇ’āļ§ āļ‘āˇ„āˇ’RGB āˇ€āļģāˇŠāļĢ āļšāˇšāļ­āļē āļŊāļļāˇ āļ¯āˇ™āļēāˇ’.

Syntax:

QBColor (ColorNumber As Integer)

Return value:

Long

Parameters:

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 : āˇƒāˇ”āļ¯āˇ”

8 : āļ…āˇ…āˇ”āļ´āˇāļ§

9 : āļŊāˇ āļąāˇ’āļŊāˇŠ

10 : āļŊāˇ āļšāˇœāˇ…

11 : āļŊāˇ āļ¸āļēāˇ”āļģ āļąāˇ’āļŊ

12 : Light Red

13 : āļŊāˇ āļ¯āļ¸āˇŠāļ´āˇāļ§ āļ­āļ¯ āļģāļ­ (āļ¸āˇāļĸāˇ™āļąāˇŠāļ§āˇ)

14 : āļŊāˇ āļšāˇ„

15 : āļ¯āˇ“āļ´āˇŠāļ­āˇ’āļ¸āļ­āˇŠ āˇƒāˇ”āļ¯āˇ”

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

Example:


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

Please support us!