QBColor Function

පැරැණි MS-DOS පදනම්වු ක්‍රමලේඛනය පද්ධතියක වර්ණ අගයක් යැවු විට එහිRGB වර්ණ කේතය ලබා දෙයි.

කාරක රීතිය:

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 : සුදු

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

උදාහරණය:

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