QBColor Function

従来の MS-DOS ベースのプログラミングシステムの使用するカラー値について、その RGB カラーコードを返します。

構文:

QBColor (ColorNumber As Integer)

戻り値:

ロング整数

パラメーター:

ColorNumber:従来の MS-DOS ベースのプログラミングシステムの使用するカラー値を示す整数表式。

ColorNumber には下記の値を指定できます。

0 : 黒

1 : 青

2 : 緑

3 : シアン

4 : 赤

5 : マゼンタ

6 : イエロー

7 : 白

8 : グレー

9 : 明るい青

10 : 明るい緑

11 : 明るいシアン

12 : 明るい赤

13 : 明るいマゼンタ

14 : 明るい黄

15 : 明るい白

この関数は、従来の MS-DOS ベースの BASIC アプリケーションで使われる上記のカラー値を変換する場合にのみ使用します。関数の戻り値は、LibreOffice IDE の使用するカラー値を示すロング整数が返されます。

Error codes:

5 無効なプロシージャー呼び出しです

例:

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