Frame 属性前景色(Outlook 窗体脚本)Frame.ForeColor Property (Outlook Forms Script)

返回或设置一个 Long 类型的值,指定对象的前景色。Returns or sets a Long that specifies the foreground color of an object. 读/写。Read/write.

语法Syntax

表达式前景色expression.ForeColor

_表达式_一个代表Frame对象的变量。expression A variable that represents a Frame object.

备注Remarks

您可以使用任何表示有效颜色的整数。You can use any integer that represents a valid color. 您还可以通过使用 Visual Basic RGB函数和红色、绿色和蓝色分量指定颜色。You can also specify a color by using the Visual Basic RGB function with red, green, and blue color components. The value of each color component is an integer that ranges from zero to 255.The value of each color component is an integer that ranges from zero to 255. 例如,可以将蓝绿色蓝色指定为整数值4966415,或者指定为红色、绿色和蓝色成分15、200、75,如下面的示例所示。For example, you can specify teal blue as the integer value 4966415 or as red, green, and blue color components 15, 200, 75, as shown in the following example.

RGB(15,200,75)

使用窗体上控件的前景色属性可使其易于阅读或传达特殊的含义。Use the ForeColor property for controls on forms to make them easy to read or to convey a special meaning. 例如,如果某个文本框用于报告库存量,则可以在该值降到再订购线以下时更改文本的颜色。For example, if a text box reports the number of units in stock, you can change the color of the text when the value falls below the reorder level.

ForeColor 更改标题的颜色。The ForeColor changes the color of the caption.

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.