Bagikan melalui


Using Command-Line Options When Starting Visual FoxPro

In addition to using the SET command and a configuration file, you can specify startup options by including a command-line switch. For example, using command-line options, you can suppress the display of the Visual FoxPro sign-on screen or specify a non-default configuration file. The following table lists the command-line switches available in Visual FoxPro.

To use a command-line switch

  • Add the switch after Vfp8.exe or any Visual FoxPro-created .exe on the command line or in a shortcut.

    If the command-line switch includes a file name, do not put any spaces between the switch and the file name.

Command-line switches for Visual FoxPro

Switch Description
-A
Ignores the default configuration file and Windows registry settings.
-BFileName,Duration
Displays your own bitmap (.bmp), .gif, or .jpg graphic file and specifies its duration when Visual FoxPro is started. If the bitmap you specify cannot be located, a bitmap is not displayed when Visual FoxPro is started. The -b command line switch can also be included in a Visual FoxPro shortcut.
-CFileName
Specifies a configuration file (including path if necessary) other than the default (Config.fpw).
-DFileName
Specifies a runtime .DLL file (including path if necessary) other than the default.
-LFileName
Specifies a resource file (including path if necessary) other than the default, which allows you to use Visual FoxPro in a language other than the current language specified by Windows.
-R
In earlier versions, refreshes the Windows registry with information about Visual FoxPro, such as associations for Visual FoxPro files. In later versions, use /regserver.
-T
Suppresses the display of the Visual FoxPro sign-on screen (banner). For more information, see Preventing Display of the Sign-On Screen.
/?
List the available Command line arguments. Available in Visual FoxPro 7 and later.
/regserver
Registers Visual FoxPro default registry keys.
REGSVR32 <server.DLL>
Registers a .DLL component.
/unregserver
Removes Visual FoxPro default registry keys.
/u <server.DLL>
Removes a .dll component.

If the command switch requires arguments such as a file name, do not put a space between the switch and the argument. Separate multiple options with single spaces. For example, to specify a configuration file, use a command such as:

C:\Program Files\Microsoft Visual FoxPro 8\VFP8.EXE -CC:\MYAPP\MYAPP.FPW

Preventing Display of the Sign-On Screen

By default, when Visual FoxPro starts, it displays a sign-on screen that shows the Visual FoxPro logo, version number, and other information. If you prefer that users of your application not see this sign-on screen, you can prevent Visual FoxPro from displaying it.

To prevent the display of the sign-on screen

  • Add the -T switch to the Visual FoxPro command line as a command-line switch.

    **Note   **For compatibility with earlier versions of Visual FoxPro, you can also set switches using the FOXPROWCFG DOS environment variable, but this method is not recommended.

For example, use a command such as:

VFP8.EXE -T

See Also

Visual FoxPro Environment Settings | Setting Configuration Options at Startup | Customizing the Visual FoxPro Environment | Configuring Visual FoxPro Toolbars