Table of contents
TOC
折叠目录
展开目录

ApplicationSettings.StencilBackgroundColorGradient 属性 (Visio)ApplicationSettings.StencilBackgroundColorGradient Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

确定当前会话的 Microsoft Visio 模具窗口的背景渐变颜色。可读写。Determines the background gradient color of the Microsoft Visio stencil window for the current session. Read/write.

语法Syntax

表达式StencilBackgroundColorGradientexpression . StencilBackgroundColorGradient

表达式_一个表示ApplicationSettings对象的变量。_expression A variable that represents an ApplicationSettings object.

返回值Return Value

OLE_COLOR 时OLE_COLOR

注解Remarks

到下一个StencilBackgroundColorGradient属性设置不从一个会话的 Visio 会保留。The StencilBackgroundColorGradient property setting does not persist from one session of Visio to the next.

在 Visio 中ole_color 时属性的有效值可以是下列项之一:Valid values for an OLE_COLOR property within Visio can be one of the following:

  • &;H00 bbggrr,_其中_bb_是蓝色的值介于 0 和 0xFF (255), _gg_的绿色值和_rr_的红色值。&;H00 _bbggrr, where bb is the blue value between 0 and 0xFF (255), gg the green value, and rr the red value.

  • &;H800000 xxxx_是一个有效的GetSysColor索引的位置。&;H800000 _xx , where xx is a valid GetSysColor index.

GetSysColor函数的详细信息,搜索 MSDN 上的 Microsoft 平台 SDK 中的" GetSysColor "。For details about the GetSysColor function, search for " GetSysColor " in the Microsoft Platform SDK on MSDN.

OLE_COLOR数据类型用于返回颜色的属性。当某个属性被声明为ole_color 时属性窗口将显示颜色选取器对话框,使用户可以直观地选择属性的颜色而不必记住等效的数字值。The OLE_COLOR data type is used for properties that return colors. When a property is declared as OLE_COLOR , the Properties window displays a color-picker dialog box that allows the user to select the color for the property visually, rather than having to remember the numeric equivalent.

此外,您可以使用以下 Microsoft Visual Basic for Applications (VBA) 颜色常数为ole_color 时In addition, you can use the following Microsoft Visual Basic for Applications (VBA) color constants for OLE_COLOR .

常量ConstantValue说明Description
vbBlackvbBlack0x00x0黑色Black
vbRedvbRed0xFF0xFF红色Red
* * vbGreen * * vbGreen**0xFF000xFF00绿色Green
vbYellowvbYellow0xFFFF0xFFFF黄色Yellow
vbBluevbBlue0xFF00000xFF0000蓝色Blue
* * vbMagenta * * vbMagenta**0xFF00FF0xFF00FF洋红色Magenta
* * vbCyan * * vbCyan**0xFFFF000xFFFF00蓝绿色Cyan
* * vbWhite * * vbWhite**0xFFFFFF0xFFFFFF白色White

您可以通过设置单个模具窗口的背景渐变颜色ActiveWindow.Windows (n)。BackgroundColorGradient属性,其中_n_代表的模具窗口Windows集合中的索引号。模具窗口打开时为一个浮动窗口,也可以是活动窗口,并可以通过使用ActiveWindow.BackgroundColorGradient属性来设置其背景渐变颜色。如果以这种方式打开模具窗口,活动模具窗口的背景属性设置为非默认值 (-1) 的值将覆盖该窗口的StencilBackgroundColorGradient设置。可以通过设置StencilBackgroundColorGradient属性重置相同活动模具窗口的背景渐变颜色,必须复位到其默认值为-1 BackgroundColorGradient 。这种类型的多个模具窗口处于打开状态,如果将BackgroundColorGradient设置为一个窗口已不会影响其他打开的窗口的设置。You can set the background gradient color for an individual stencil window by using the ActiveWindow.Windows(n).BackgroundColorGradient property, where n represents the index number of the stencil window in the Windows collection. When a stencil window is opened as a floating window, it can be an active window, and you can set its background gradient color by using the ActiveWindow.BackgroundColorGradient property. If you have opened a stencil window in this manner, setting the BackgroundColor property of the active stencil window to a value other than the default (-1) overrides the StencilBackgroundColorGradient setting for that window. To be able to reset the background gradient color of the same active stencil window by setting the StencilBackgroundColorGradient property, you must reset BackgroundColorGradient to its default value, -1. If multiple stencil windows of this type are open, setting BackgroundColorGradient for one window has no effect on the setting for other open windows.

请注意 您可以指定两种颜色作为模具背景。如果用户的屏幕分辨率足够高,一种颜色将评分为另一种从顶部到底部的屏幕。若要能够使用此功能,用户必须设置显示器来显示 32 位颜色。若要以编程方式为在高对比度模式下运行的用户设置模具背景色的功能受到限制。Note You can specify two colors for the stencil background. If users' screen resolution is adequate, one of the colors will grade into the other from the top to the bottom of the screen. To be able to use this feature, users must set their monitors to display 32-bit color. The ability to set stencil background color programmatically for users running in high-contrast mode is restricted.

© 2018 Microsoft