Information.QBColor(Int32) 方法

定義

傳回 Integer 值,表示對應到指定之色彩編號的 RGB 色彩代碼。

public:
 static int QBColor(int Color);
public static int QBColor (int Color);
static member QBColor : int -> int
Public Function QBColor (Color As Integer) As Integer

參數

Color
Int32

必要。 介於 0-15 範圍之間的整數。

傳回

傳回 Integer 值,表示對應到指定之色彩編號的 RGB 色彩代碼。

例外狀況

Color 超出 0 到 15 的範圍 (含 0 和 15)。

範例

這個範例會使用函 QBColor 式來變更為 所指示的 colorInteger色彩。 QBColor 接受介於 0 到 15 之間的整數值。

Dim colorInteger As Integer
' Use 4 for red.
colorInteger = QBColor(4)

備註

從最小顯著位元組開始,傳回的值會指定紅色、綠色和藍色值,以在Visual Basic語言所使用的 RGB 系統中設定適當的色彩。

Color 變數具有這些設定。

Number 色彩 Number 色彩
0 黑色 8 灰色
1 藍色 9 淺藍色
2 綠色 10 淺綠
3 11:青色 11 淺青色
4 紅色 12 淺紅色
5 桃紅色 13 淺色 magenta
6 黃色 14 淺黃色
7 白色 15 亮白色

適用於

另請參閱