What is the Difference Between FoxPro and Visual FoxPro?

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 nevertheless work in Visual FoxPro, they will be saved as VFP tables if the structure of the table is alternation. Additionally, Visual FoxPro tables can accept null values. To prevent errors produced 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 meaningful combination, to prevent users from attempting to store null values to tables, by using this statement: “ON meaningful 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 kind. (See “Data and Field Types” in the VFP Help file.)

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

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

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

• Numeric fields = money data kind, Double field kind, Float field kind, Integer field kind, or Numeric data kind.

• 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 = similarities, methods, and event code. (See “Setting similarities at Design Time” and “Assigning Method and Event Code” in the VFP Help file.)

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

• Popup = ComboBox control

• strength 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 alternation 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 character, Top character

• @… SAY PICTURE = Image, OLE Bound

• BORDER = BorderStyle character

• MOVE WINDOW CENTER = AutoCenter character

• Color = ColorSourceForeColor, BackColor character

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

• Date data kind = Date Data kind and Date Time kind

• DBCONNECT = SQLCONNECT( ) Function

• DBEXEC = SQLEXEC( ) Function

• DEACTIVATE MENU, DEACTIVATE POPUP, DEACTIVATE WINDOW = Deactivate Event

• @… GET DEFAULT = Default character

• DEFINE WINDOW CLOSE = Closable character

• DEFINE WINDOW FLOAT = Movable character

• DEFINE WINDOW HALFHEIGHT = HalfHeightCaption character

• DEFINE WINDOW ICON FILE = Icon character

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

• permit, Disable = Enabled character

• Font (Text Menu) = FontName character

• Font size (Font dialog) = FontSize character

• Font style bold (Font dialog) = FontBold character

• Font style italic (Font dialog) = FontItalic character

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

• Height = Height character

• Horizontal position (Screen Layout dialog) = Left character

• @… GET MESSAGE cMessageText = StatusBarText character

• MODIFY SCREEN = MODIFY FORM command

• MODIFY STRUCTURE = TABLE Designer

• Numeric data kind = Numeric data kind plus Float field kind, Integer field kind, Double field kind, and money data kind

• Picture = InputMask character

• READ ACTIVATE = ReadActivate event

• READ CYCLE = ReadCycle character

• READ DEACTIVATE = ReadDeactivate event

• READ LOCK = ReadLock character

• READ NOMOUSE = ReadMouse character

• READ SAVE = ReadSave character

• READ SHOW = ReadShow event

• READ TIMEOUT = ReadTimeout character

• 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 similarities

• Style (Font dialog) = FontBold, FontItalic, FontUnderline similarities, FontShadow character,FontOutline character, FontStrikeThru character

• Terminate on selection (Screen Builder)= TerminateRead character

• Title (Screen Builder) = Caption character

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

• Valid Error = ErrorMessage

• Vertical position (Screen Layout dialog) = Top character

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

• Width (Screen Builder) = Width character

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 = similarities 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 meaningful combinations. Below are a few of the most useful navigation meaningful 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)

go into null values into null enabled fields

• Ctrl + 0 (Visual FoxPro)

Disable ability for users to go into 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 character 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 similarities

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

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

• READ = WindowType character

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 ecosystem in order to control report content by 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 kind” in the Visual FoxPro Help file)

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

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

Leave a Reply