Wednesday, March 29, 2017

Use Windows themes in controls on forms

Use Windows themes in controls on forms

Microsoft Office Access 2007 allows you to apply the current Microsoft Windows visual theme to the controls on your database forms. This creates a more consistent visual experience for the users of your database, because the controls on your forms match the controls in Windows dialog boxes, wizards, and so on. By default, Office Access 2007 enables Windows themes for any new databases that you create but does not enable them for existing databases. When Windows themes are enabled, each control uses the theme either until you disable use of the theme for the current database or until you set or change certain display properties for that control.

The information in this article explains how to enable or disable the use of Windows themes for a database and how to change a Windows visual theme. It also provides a reference that explains which display settings stop the control from using a Windows theme.

In this article

Turn on or off Windows themes for controls

Change a Windows visual theme

Control customization reference

Turn on or off Windows themes for controls

You enable or disable Windows themes by setting a program option that applies to the open database.

  1. Open the database for which you want to enable or disable a Windows theme.

  2. Click the Microsoft Office Button Office button image , and then click Access Options.

  3. Click Current Database.

  4. Under Application Options, select or clear the Use Windows-themed Controls on Forms check box, and then click OK.

Examples

The following illustration shows a form in a database that does not use Windows-themed controls. Note the color, shape, and shading of the various controls.

Controls in a database that does not inherit Windows themes

The following illustration shows the same form, this time with the database set to use Windows-themed controls. In this case, the Windows visual theme has been set to Windows Vista.

Controls using the Windows Vista theme

The following illustration shows the same form, this time with the Windows visual theme set to Windows Classic.

Controls using the Windows Classic theme

If you distribute a database that uses Windows-themed controls, the controls use the Windows theme that is is currently selected on the computer on which the database is running.

Top of Page

Change a Windows visual theme

  • In Windows Vista    

    1. Right-click the desktop and then click Personalize on the shortcut menu.

    2. Under Personalize appearance and sounds, click Theme.

    3. In the Theme Settings dialog box, in the Theme drop-down list, select the theme you want, or select Browse to display the Open Theme dialog box, in which you can browse to a custom theme file (with a .Theme file name extension) that you have saved at a specific location.

  • In Microsoft Windows XP    

    1. Right-click the desktop and then click Properties on the shortcut menu.

    2. On the Themes tab of the Display Properties dialog box, in the Theme drop-down list, select the theme you want, or click Browse to browse to a custom theme file (with a .Theme file name extension) that you have saved at a specific location.

Top of Page

Control customization reference

When you enable Windows-themed controls in a database, the Access controls will use the Windows theme that is applied until you change certain display properties for those controls. The following table lists the various control types and the properties that you set to customize each type of control and thus stop it from using the Windows theme.

This type of control

Stops using the Windows theme when you change this property

To the following setting

Tab control

BackStyle

Solid

Option group

BackStyle

Transparent

Check box

BorderWidth

Greater than 2 points

Radio button

BorderWidth

Greater than 2 points

Any control

SpecialEffect

Raised, Shadowed, or Chiseled

Any control

BorderStyle

Any setting other than Solid or Transparent

Any control

BorderColor

Any color other than Black or Transparent

Note: Access provides one exception to this rule: If you set the SpecialEffect property to Etched, you can also set the BorderColor property to Gray without customizing the control.

Top of Page

1 comment: