Partager via


SYS(3056) - Read Registry Settings

Forces Visual FoxPro to read its registry settings again and update itself with the current registry settings, or to write its settings to the registry.

SYS(3056 [, nValue])

Return Value

Character

Parameters

  • nValue
    The following table describes the values for nValue.

    Value

    Description

    1

    (Default) Include the 1 option to update only from registry settings, with the exception of SET commands and file locations.

    2

    Include the 2 option to write Visual FoxPro settings to the registry. Including the 2 option is identical to choosing Set As Default in the Options Dialog Box (Visual FoxPro).

Remarks

Returns the empty string.

Visual FoxPro stores the Options dialog box settings in the Windows registry. You can also store additional Visual FoxPro configuration settings in a text file, normally named Config.fpw. Visual FoxPro is configured when it is started by reading these registry settings and its configuration file (if one exists).

The settings you specify in the Options dialog box are written to the registry when you choose Set As Default. Some settings, such as those for Syntax Coloring, are stored in the registry but have no corresponding SET commands. Other settings do have corresponding SET commands (such as SET BELL, SET CLOCK, and so on) that affect the Visual FoxPro environment. The settings made from the File Locations tab in the Options dialog box are also stored in the registry, and some are accessible through system variables such as _COVERAGE and _SAMPLES.

Issuing SYS(3056) updates information from the registry settings and the corresponding SET commands, registry settings from the Options dialog File Locations tab, and the Visual FoxPro configuration file (if one exists). SYS(3056) reads the registry information first, and then the configuration file.

Issuing SYS(3056,1) updates information from the Visual FoxPro registry settings that don't have corresponding SET commands. The SET commands, File Locations registry settings, and configuration file information aren't updated if the 1 argument is included.

Issuing SYS(3056,2) writes the Options dialog box settings to the Windows registry.

Note that registry settings can also be changed directly through the Windows API. See the Windows API section of Solution.app, located in the Visual FoxPro ...\Samples\Solution directory, for an example of how you can use the Windows API to modify registry settings.

See Also

Tasks

Read and Write Visual FoxPro Registry Values Sample

How to: Change Configuration Settings in the Windows Registry

Reference

SET Command Overview

Options Dialog Box (Visual FoxPro)

SYS( ) Functions Overview