Compartir a través de


Windows XP Themes Support Sample

File: ...\Samples\Solution\Toledo\Themes.scx

This sample demonstrates different levels of Visual FoxPro support for Windows XP Themes. Themes are turned on by default.

Visual FoxPro supports Windows XP themes at three levels:

  • Application level using SYS(2700) - Enables Windows XP Themes and _SCREEN Themes property

  • Form level using the Form Themes property

  • Control level

Themes Support at the Application Level

In this sample, you can turn Themes on in the entire Visual FoxPro application using the SYS(2700) - Enables Windows XP Themes function by selecting Enable Themes at the application level - SYS(2700), which uses the following code:

SYS(2700,1)

To turn Themes off, pass a zero (0) as the second parameter to SYS(2700).

SYS(2700,0)

To turn Themes on using the _SCREEN variable, select Enable Themes at the application level - _SCREEN.Themes, which sets _SCREEN Themes to True (.T.):

_SCREEN.Themes = .T.

To turn Themes off using _SCREEN, set _SCREEN Themes to False (.F.):

_SCREEN.Themes = .F.

For more information, see SYS(2700) - Enables Windows XP Themes and Themes Property.

Themes Support at the Form Level

In this sample, to turn Themes on at the form level, select Enable Themes at the form level, which sets the form's Themes property to True (.T.):

ThisForm.Themes = .T.

Themes Support at the Control Level

You can also turn on Themes support for individual controls. Turning Themes off at the control level overrides the Themes setting at the application or form level. Depending on the control, you can set Themes support through the Themes or Style properties.

For more information, see Style Property.

See Also

Other Resources

Programming Solution Samples