Share via


Environment (Visual FoxPro)

These commands and functions make it possible for you to manage a wide range of Microsoft Visual FoxPro system and environment parameters.

Use

To

ADIR( ) Function

Place information about files into an array and then return the number of files.

ADLLS( ) Function

Return an array containing the names of functions loaded by DECLARE DLLs.

ALANGUAGE( ) Function

Return an array containing the names of all valid Visual FoxPro commands, functions, or base classes. 

APROCINFO( ) Function

Create an array containing Visual FoxPro language elements contained in a program file.

ASESSIONS( ) Function

Create an array of existing data session IDs. 

ASTACKINFO( ) Function

Create an array and populate it with information about the current state of the call stack. 

_BROWSER System Variable

Specify the name of the class browser application.  

_BUILDER System Variable

Specify the name of the Visual FoxPro builder application. 

CAPSLOCK( ) Function

Return the current mode of the CAPS LOCK key or sets the CAPS LOCK key mode on or off. 

CREATE COLOR SET Command

Create a color set from the current color settings. 

CREATE VIEW Command

Create a view file from the Visual FoxPro environment. 

CurrentX, CurrentY Properties

Specify the horizontal (X) and vertical (Y) coordinates for the next drawing method. Not available at design time; read/write at run time.

DECLARE - DLL Command

Register a function in an external shared library.  

DIR or DIRECTORY Command

Display information about the files in a directory. 

DISKSPACE( ) Function

Return the number of bytes available on the default or specified disk drive or volume. 

DISPLAY DLLS Command

Display information about shared library functions registered in Visual FoxPro with DECLARE – DLL. 

DISPLAY STATUS Command

Display the status of the Visual FoxPro environment. 

FKLABEL( ) Function

Return the name of the function key (F1, F2, F3 ...) from the key's corresponding function key number. 

FKMAX( ) Function

Return the number of programmable function keys or function key combinations on your keyboard. 

FONTMETRIC( ) Function

Return font attributes for the current installed operating system fonts. 

_GALLERY System Variable

Specify the program that is executed when you choose Component Gallery from the Tools menu. 

_GENHTML System Variable

Specify an HTML (Hypertext Markup Language) generation program. 

GETCOLOR( ) Function

Display the Windows Color dialog box and return the color number of the chosen color. 

GETCP( ) Function

Prompt for a code page by displaying the Code Page dialog box, and then return the number of the code page chosen. 

GETENV( ) Function

Return the contents of the specified MS-DOS environment variable. 

_GETEXPR System Variable

Specify the program that is executed when you issue the GETEXPR command or invoke the Expression Builder dialog box from within Visual FoxPro. 

GETFILE( ) Function

Display the Open dialog box and return the name of the file you chose. 

GETFONT( ) Function

Display the Font dialog box and return information about the font you choose. 

GETPEM( ) Function

Return the current value for a property or program code for an event or method at design time. 

HOME( ) Function

Return the names of the Visual FoxPro and Visual Studio directories. 

HELP Command

Open the Help window. 

IMESTATUS( ) Function

Turn the IME (Input Method Editor) window on or off or returns the current IME status. 

_INCLUDE System Variable

Specify a default header file included with user-defined classes, forms, or form sets. 

INKEY( ) Function

Return a number corresponding to the first mouse click or key press in the type-ahead buffer. 

INSMODE( ) Function

Return the current insert mode, or sets the insert mode on or off. 

ISCOLOR( ) Function

Determine whether a computer can display color. 

ISMOUSE( ) Function

Return true (.T.) if mouse hardware is present. 

LIST DLLS Command

Continuously display information about shared library functions registered in Visual FoxPro with DECLARE - DLL. 

LIST Commands

Display table or environment information without pausing the main Visual FoxPro or user-defined window. There are multiple versions of the syntax. 

LOCFILE( ) Function

Locate a file on disk and return the file name with its path.

MEMORY( ) Function

Return the amount of memory available to run an external program. 

MESSAGE( ) Function

Return either the current error message as a character string or the contents of the program line that caused the error. 

NUMLOCK( ) Function

Return the current mode of the NUM LOCK key or set the mode of the NUM LOCK key on or off. 

_ObjectBrowser System Variable

Contain the name of the object browser application. 

OBJTOCLIENT( ) Function

Return a position or dimension of a control or object relative to its form. 

OS( ) Function

Return the name and version number of the operating system under which Visual FoxPro is running. 

PCOL( ) Function

Return the current column position of the printer's print head.

PEMSTATUS( ) Function

Retrieve an attribute for a property, event, method, or object. 

PROW( ) Function

Return the current row number of the printer's print head.

PUTFILE( ) Function

Invoke the Save As dialog box and return the file name you specify. 

QUIT Command

End the current Visual FoxPro session and return control to the operating system. 

RGB( ) Function

Return a single color value from a set of red, green, and blue color components.

SCHEME( ) Function

Return a color pair list or a single color pair from a specified color scheme. 

_SCREEN System Variable

Specify properties and methods for the main Visual FoxPro window. 

SET( ) Function

Return the status of various SET commands. 

SET Commands

Open the Data Session window. The Data Session window provides an easy way to open tables, establish relations, or set or change many Visual FoxPro options.

SYS(3) - Legal File Name

Return a legal file name that can be used to create temporary files. 

SYS(5) - Default Drive

Return the current Visual FoxPro default drive. 

SYS(6) - Current Printer Device

Return the current Visual FoxPro default drive. 

SYS(7) - Current Format File

Return the name of the current format file. 

SYS(9) - Visual FoxPro Serial Number

Return your Visual FoxPro serial number. 

SYS(12) - Available Memory in Bytes

Return the amount of memory below 640K that is available to execute an external program. 

SYS(16) - Executing Program File Name

Return the file name of the program being executed. You can use SYS(16) to recover from errors. 

SYS(17) - Processor in Use

Return the central processing unit (CPU) being used. 

SYS(1001) - Visual FoxPro Memory

Return the total amount of memory available to the Visual FoxPro memory manager. 

SYS(1016) - User Object Memory Use

Return amount of memory being used by objects you define. 

SYS(1023) - Enable Help Diagnostic Mode

Enable the Help diagnostic mode, making it possible for you to trap the HelpContextID passed to the Visual FoxPro Help system.

SYS(1024) - Disable Help Diagnostic Mode

Disable the Help diagnostic mode enabled by issuing SYS(1023).

SYS(1269) - Property Information

Return a value that indicates whether a property setting has changed from its default setting or whether the property is read-only. 

SYS(1270) - Object Location

Return a reference for an object at the specified point. 

SYS(1271) - Object's .SCX File

Return the name of the .SCX file in which the specified instantiated object is stored. 

SYS(1272) - Object Hierarchy

Return the object hierarchy for a specified object. Not available at design time. 

SYS(2001) - SET ... Command Status

Return the status of the specified SET commands. 

SYS(2003) - Current Directory

Return the name of the current directory on the default drive. 

SYS(2004) - Visual FoxPro Start Directory

Return the name of the directory from which Visual FoxPro was started. 

SYS(2005) - Current Resource File

Return the name of the current Visual FoxPro resource file. 

SYS(2006) - Current Graphics Card

Return the type of graphics card and monitor you are using. 

SYS(2010) - CONFIG.SYS File Settings

Return the files setting in CONFIG.SYS. 

SYS(2013) - System Menu Name String

Return a space-delimited character string containing the internal names of the Visual FoxPro menu system. 

SYS(2019) - Configuration File Name and Location

Return the name and location of the Visual FoxPro configuration file. 

SYS(2020) - Default Disk Free Space

Return the free space in bytes on the default disk. 

SYS(2022) - Disk Cluster Size

Return the cluster size in bytes of a specified disk. 

SYS(2023) - Temporary Path

Return the path in which Visual FoxPro stores its temporary files.

SYS(2334) - Automation Server Invocation Mode

Return a value indicating how a Visual FoxPro automation server method was invoked. 

SYS(2800) - Accessibility Support

Disable or enable Microsoft Active Accessibility support and set certain options to track the keyboard focus of the currently selected control in a Visual FoxPro form. 

SYS(3004) - Return Locale ID

Return the Locale ID used by automation and ActiveX controls. 

SYS(3005) - Set Locale ID

Set the Locale ID used by automation and ActiveX controls. 

SYS(3006) - Set Language and Locale IDs

Set the Language ID and the Locale ID. 

SYS(3050) - Set Buffer Memory Size

Set the foreground or background buffer memory size. 

SYS(3053) - ODBC Environment Handle

Return the ODBC environment handle. 

SYS(3056) - Read Registry Settings

Read Visual FoxPro registry settings and update with the current registry settings. 

SYS(3095) - IDispatch Pointer

Return an outgoing IDispatch pointer for a COM object. 

SYSMETRIC( ) Function

Return the size of the operating system's screen elements. 

_TASKLIST System Variable

Contains the name of the task list manager program. 

TXTWIDTH( ) Function

Return the length of a character expression with respect to the average character width for a font. 

VERSION( ) Function

Return information about the Visual FoxPro version you are using. 

WFONT( ) Function

Return the name, size, or style of the current font for a window in Visual FoxPro for Windows. 

_WIZARD System Variable

Contain the name of the Visual FoxPro wizard application. 

See Also

Other Resources

Visual FoxPro Environment

Customizing the Visual FoxPro Environment

Language Categories