Information.QBColor(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳 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之間,包含在內。
範例
此範例使用 QBColor 函數 來改變顏色 colorInteger,由 表示。
QBColor 接受 0 到 15 之間的整數值。
Dim colorInteger As Integer
' Use 4 for red.
colorInteger = QBColor(4)
備註
從最低有效位元組開始,回傳的值指定了用來設定 Visual Basic 語言所用 RGB 系統中適當顏色的紅、綠、藍三色值。
這個 Color 論點有這些設定。
| 編號 | 顏色 | 編號 | 顏色 |
|---|---|---|---|
| 0 | 黑色 | 8 | 灰色 |
| 1 | 藍 | 9 | 䵮 |
| 2 | 綠色 | 10 | 䵮 |
| 3 | 青色 | 11 | 淺青色 |
| 4 | 紅色 | 12 | 淺紅色 |
| 5 | 品紅 | 13 | 淺洋紅色 |
| 6 | 黃色 | 14 | 淺黃色 |
| 7 | 白色 | 15 | 明亮的白色 |