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!