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 具有这些设置。
| Number | Color | Number | Color |
|---|---|---|---|
| 0 | 黑色 | 8 | 灰色 |
| 1 | 蓝色 | 9 | 淡蓝色 |
| 2 | 绿色 | 10 | 浅绿 |
| 3 | 青色 | 11 | 浅青色 |
| 4 | Red | 12 | 淡红色 |
| 5 | 洋红色 | 13 | 浅洋红色 |
| 6 | Yellow | 14 | 淡黄色 |
| 7 | White | 15 | 亮白色 |