April 19, 2024


Entertain Reaching Stars

What is the Difference Between FoxPro and Visual FoxPro?

6 min read

Visual FoxPro refers to versions of FoxPro that are newer than version 2.6; this includes versions 3.0 – 9.0. If you have used an older version of FoxPro and switch to Visual FoxPro, you will find several differences such as the terminology, language, tables and databases, keystrokes, tools, screens, and reports and layouts.

Tables and Database Differences

One difference between Visual FoxPro (VFP) and FoxPro is that the newer version distinguishes between databases and tables. While tables from FoxPro 2.6 still work in Visual FoxPro, they will be saved as VFP tables if the structure of the table is modified. Additionally, Visual FoxPro tables can accept null values. To prevent errors created by attempts to store null values to FoxPro 2.6 variables or to Visual FoxPro controls, initialize variables or arrays. You can disable the NULL-entry key combination, to prevent users from attempting to store null values to tables, by using this statement: “ON KEY LABEL CTRL+0 *”

The following are several table and database differences between Fox Pro 2.6 and Visual Fox Pro

(FoxPro 2.6 Functionality = Visual FoxPro Functionality)

• Character field with NOCPTRANS Characteristic = Character (BINARY) field type. (See “Data and Field Types” in the VFP Help file.)

• General field size = Now 4 bytes. (See “General Field Type” in the VFP Help file.)

• Memo field size = Now 4 bytes. (See “Memo Field Type” in the VFP Help file.)

• Memo field with NOCPTRANS Characteristic = Memo (BINARY) field type. (See “Data and Field Types” in the VFP Help file.)

• Numeric fields = Currency data type, Double field type, Float field type, Integer field type, or Numeric data type.

• OLE data in a General field = OLE Bound Control.

Terminology Differences

Visual FoxPro redefines several terms from older versions of FoxPro including:

(FoxPro 2.6 Functionality = VFP Functionality)

• @… GET field = text box control

• Blanks or empty fields or variables = Null values

• Browse (in a Form) = Grid control

• Buffer = Record and table buffers and transactions. (See “Buffering Access to Data” and “Using Transactions” in the VFP Help file.)

• Code snippets = Properties, methods, and event code. (See “Setting Properties at Design Time” and “Assigning Method and Event Code” in the VFP Help file.)

• Edit region = EditBox control (See “Visual FoxPro Naming Rules” in the Visual FoxPro Help file.)

• Popup = ComboBox control

• Power tools = Visual designers and toolboxs. (See “Using Designers” and “Using Toolbars” in the Visual FoxPro Help file.)

• PushButton = CommandButton control

• Radio button = OptionButton control

• Screen = Form

• Screen picture = Image control

• Screen set = Form set

• Text = Label control

Language Differences

In addition to the new commands for Visual FoxPro, commands for FoxPro 2.6 are backwards compatible and fully functional with VFP. There are several commands for FoxPro 2.6 that have modified or enhanced capabilities in VFP. Additionally, Visual Fox Pro allows long names for objects, variables, windows, and tables. With the exception of field names in free tables and index tags, you are able to use up to 254 characters. Some of the important language differences are listed below:

(FoxPro 2.6 Functionality = VFP Functionality)

• @… SAY = Left Property, Top property

• @… SAY PICTURE = Image, OLE Bound

• BORDER = BorderStyle property

• MOVE WINDOW CENTER = AutoCenter property

• Color = ColorSourceForeColor, BackColor property

• Color scheme = ForeColor property, BackColor property, ColorScheme property

• Date data type = Date Data Type and Date Time Type


• DBEXEC = SQLEXEC( ) Function


• @… GET DEFAULT = Default property

• DEFINE WINDOW CLOSE = Closable property

• DEFINE WINDOW FLOAT = Movable property

• DEFINE WINDOW HALFHEIGHT = HalfHeightCaption property


• EMPTY( ), BLANK( ) to check for non-existent data = ISNULL( ) to check for null values representing unknown or non-existent data

• Enable, Disable = Enabled property

• Font (Text Menu) = FontName property

• Font size (Font dialog) = FontSize property

• Font style bold (Font dialog) = FontBold property

• Font style italic (Font dialog) = FontItalic property

• @… SAY FUNCTION, any @… GET FUNCTION = Format property

• Height = Height property

• Horizontal position (Screen Layout dialog) = Left property

• @… GET MESSAGE cMessageText = StatusBarText property



• Numeric data type = Numeric data type plus Float field type, Integer field type, Double field type, and Currency data type

• Picture = InputMask property

• READ ACTIVATE = ReadActivate event

• READ CYCLE = ReadCycle property

• READ DEACTIVATE = ReadDeactivate event

• READ LOCK = ReadLock property

• READ NOMOUSE = ReadMouse property

• READ SAVE = ReadSave property

• READ SHOW = ReadShow event

• READ TIMEOUT = ReadTimeout property

• READ VALID = ReadValid event

• READ WHEN = ReadWhen event

• Screen Name = Name

• SET NOCPTRANS = (See “Preventing Translation of Data in Character or Memo Fields” in the VFP Help file)

• SHOW GET, SHOW GETS = Refresh method

• Size (Screen Layout dialog) = Height, Width properties

• Style (Font dialog) = FontBold, FontItalic, FontUnderline properties, FontShadow property,FontOutline property, FontStrikeThru property

• Terminate on selection (Screen Builder)= TerminateRead property

• Title (Screen Builder) = Caption property

• Valid (Screen Builder) = Click event, DblClick event, LostFocus event, Valid event

• Valid Error = ErrorMessage

• Vertical position (Screen Layout dialog) = Top property

• When (Screen Builder) = GotFocus event, When event

• Width (Screen Builder) = Width property

Tool Differences

While some of the tools in Visual FoxPro are the same as in FoxPro 2.6, there are several Visual FoxPro tools that are different or have different functionality. Below is a rundown of some of the big differences:

(FoxPro 2.6 Functionality = VFP Functionality)

• Catalog Manager = Project Manager

• Project Manager = Project Manager

• Screen Builder = Form Designer

• Align (Object menu) = Layout toolbox

• Screen Builder Toolbox = Form Controls toolbox

• Control dialogs and screen layout dialogs = Properties window

• Menu Builder = Menu Designer

• RQBE = Query Designer

• Report Writer = Report Designer

• Label Designer = Label Designer

• View window options = Tools Menu items

• Transporter = Conversion Options dialog box

• Browse window = Grid Control

Keystroke Differences

There are a few differences in the way the latest versions of FoxPro and FoxPro 2.6 defines some of their navigation key combinations. Below are a few of the most useful navigation key commands that are new or different.

To create a new file

• Ctrl + N (VFP)

Add a record to a browse window

• Ctrl + N (FoxPro 2.6)

• Ctrl + Y (VFP)

Do program in edit window

• Ctrl + O (FoxPro 2.6)

• Ctrl + E (VFP)

Enter null values into null enabled fields

• Ctrl + 0 (Visual FoxPro)

Disable ability for users to enter null values into null enabled fields

• On label: Ctrl + 0 (VFP)

Screen Differences

While you are able to run unconverted FoxPro 2.6 screen files (.spr) in FoxPro Visual, Visual FoxPro forms use code in events, methods, and property settings in place of code snippets. Below, some of these differences are highlighted.

• (FoxPro 2.6 Functionality = VFP Functionality)

• #DEFINE, #INSERT preprocessor statements = Global include file called by new.SPR file. (See “Checking the.SPR File” in the VFP file.)

• #Section 1 Setup code = Form set Load event

• #Section 2 Setup code = Form Load event

• Cleanup code except procedures = Unload event

• Code snippets = Method and event code and properties

• Constants = Resolved only in method and event code (See “Checking the.SPR File” in the Visual FoxPro Help file.)

• Macro substitutions = Unresolved in properties. Use variables instead (See “Checking Converted FoxPro 2.6 Screens” in the Visual FoxPro Help file.)

• READ = WindowType property

Report and Label Differences

Though you are able to use unconverted FoxPro 2.6 reports and labels in Visual FoxPro, with Visual FoxPro reports and labels, you can set and control the data environment in order to control report content through report variables. Some of the differences between FoxPro 2.6 and Visual FoxPro are shown below:

• (FoxPro 2.6 Functionality = VFP Functionality)

• Controls generated with the FoxPro Report Wizard using “Position Relative To” options = Might need adjustment in Visual

• Memo field size = Now 4 bytes. (See “Memo field type” in the Visual FoxPro Help file)

• REPORT TO FILE = REPORT TO FILE ASCII creates simple text file

• REPORT ENVIRONMENTLABEL ENVIRONMENT = Data Environment (View Menu) (See “Setting Report and Data Sources” and “Controlling a Report’s Data Sources” in the Visual FoxPro Help file)

Copyright © highandright.com | Newsphere by AF themes.