Specifies whether Windows XP Themes are enabled or disabled for a control. For forms and toolbars, Themes controls whether child objects are themed. Read/write at design and run time.
Note The Themes property for visual classes can affect your existing user interface when using Microsoft Windows XP. You can turn this support off by setting the Themes property at the control, form, or _SCREEN system variable level.
Object.Themes [ = lExpr ]
- Logical data type. The following table lists the settings for lExpr.
lExpr True (.T.) Enabled (Default) False (.F.) Disabled
Controls defined using @...GET or @...SAY and similar @... commands are not compatible with Windows XP Themes. Therefore, when running programs written with FoxPro 2.x on Windows XP or later, you should set the _SCREEN Themes property to False (.F.); otherwise, the controls on the forms disappear.
When Themes is enabled, Visual FoxPro overrides the SpecialEffect property and uses the default theme except when SpecialEffect is set to a value of 2 (hot tracking). In this scenario, Visual FoxPro preserves hot tracking, which displays special effects when you move the mouse over the CommandButton, graphical OptionButton and CheckBox controls.
For CheckBox controls, Themes supports three-state check boxes.
For Form and ToolBar objects, Themes enables themes for the entire form. To enable themes for a control, you need to set Themes to True (.T.) for both the form and control. For other container controls such as PageFrame, Themes does not control how child objects display themes; it controls only visual aspects such as borders or tabs.
Note When Themes are enabled, you should avoid using the CLEAR COMMAND for forms because it might cause paint issues with themed controls, such as command buttons, that have mouse hovering effects.
For OptionGroup, CommandGroup, and Image controls, Themes determines whether borders are themed.
Controls such as PageFrame tabs and Grid headers are dynamically drawn by the operating system Themes manager when you move your mouse over them. Therefore, do not position other controls on top of these controls.
For a Grid control, Themes affects the visual appearance of column headers. If themes are enabled for a grid, the BackColor and ForeColor properties of the header are disregarded because they inherit the attributes of the theme. However, the BackColor and ForeColor properties of a Column object display independently from the setting of a grid's Themes property.
For PageFrame controls, Themes determines whether tabs are themed. You might need to make minor modifications to forms that contain PageFrame objects. The Themes property provides a gradient effect on Page objects, so a label, option button, or similar control with text does not appear correctly if the BackStyle property of the control is set to Opaque. You can remedy this situation by setting BackStyle to Transparent.
If your operating system does not support themes, or if Themes is turned off, Visual FoxPro uses the settings controlled by SpecialEffect and other properties.
You can use set _SCREEN Themes property to False (.F.) to disable Themes entirely in Visual FoxPro.
Note When you set _SCREEN Themes property, you do not actually alter the current state of Themes set at the operating system level. You should use SYS(2700) - Enables Windows XP Themes to check the current state of Themes.
For more specific details about Windows XP Themes, see the following resources:
- "Using Windows XP Visual Styles" at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp
- "Visual Styles" at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/Userex/themes.asp
- "Microsoft Windows XP: What's in It for Developers?" at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/winxpintro.asp
Applies To: CheckBox Control, ComboBox Control | CommandButton Control | CommandGroup Control | Form Object | Grid Control | Image Control | ListBox Control | OptionButton Control | OptionGroup Control | PageFrame Control | Spinner Control | TextBox Control | ToolBar Object