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 earlier version of FoxPro and switch to Visual FoxPro, you will find several differences, including terminology, language, tables and databases, keystrokes, tools, screens, and reports and layouts.

Differences between tables and databases

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

The following are various 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 field type (BINARY). (See “Data Types and Fields” 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 = Type of Memo field (BINARY). (See “Data Types and Fields” 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 earlier versions of FoxPro, including:

(FoxPro 2.6 functionality = VFP functionality)

• @…GET field = text box control

• Blanks or empty fields or variables = null values

• Browse (on a form) = grid control

• Buffer = Buffers and transactions of registers and tables. (See “Data Access Buffer” and “Using Transactions” in the VFP help file.)

• Code snippets = Properties, methods and event code. (See “Configuring Properties at Design Time” and “Event Code and Method Mapping” 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 Tool Boxes. (See “Using Designers” and “Using Toolbars” in the Visual FoxPro help file.)

• PushButton = Push Button Control

• Radio Button = Radio Button control

• Screen = Form

• Screen Image = Image Control

• Set of screens = Set of forms

• Text = Label Control

language differences

In addition to the new commands for Visual FoxPro, the commands for FoxPro 2.6 are backward compatible and fully functional with VFP. There are several commands for FoxPro 2.6 that have changed 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 can 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 IMAGE = Image, OLE Binding

• BORDER = BorderStyle property

• MOVE WINDOW CENTER = property of AutoCenter

• Color = ColorSourceForeColor, BackColor property

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

• Date data type = Date data type and Date and time type

• DBCONNECTION = SQLCONNECTION( ) function

• DBEXEC function = SQLEXEC( )

• DISABLE MENU, DISABLE POPUP, DISABLE WINDOW = Disable Event

• @…GET DEFAULT = Default property

• DEFINE WINDOW CLOSURE = Closable Property

• DEFINE FLOATING WINDOW = Personal property

• SET WINDOW HALFHEIGHT = HalfHeightCaption property

• SET WINDOW ICON FILE = Icon Property

• EMPTY( ), BLANK( ) to check for missing data = ISNULL( ) to check for null values ​​that represent unknown or missing data

• Enable, Disable = property Enabled

• Font (TextMenu) = FontName property

• Font Size (Font dialog box) = Font Size property

• Bold Font Style (Font dialog box) = FontBold property

• Italic Font Style (Font dialog) = FontItalic property

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

• Height = Height property

• Horizontal Position (Screen Layout dialog box) = Left Property

• @… GET MESSAGE cMessageText = StatusBarText property

• MODIFY SCREEN = command MODIFY FORM

• MODIFY STRUCTURE = TABLE Designer

• Numeric data type = Numeric data type plus float field type, integer field type, double field type, and currency data type

• Image = InputMask property

• READ ACTIVATE = event ReadActivate

• READ CYCLE = ReadCycle property

• READ DISABLE = ReadDisable event

• READ LOCK = ReadLock property

• READ NOMOUSE = ReadMouse property

• READ SAVE = ReadSave property

• READ SHOW = Read event Show

• READ TIMEOUT = Read Timeout property

• READ VALID = ReadValid event

• READ WHEN = ReadWhen event

• Screen Name = Name

• SET NOCPTRANS = (See “Prevent data translation in character fields or memos” in the VFP help file)

• SHOW GET, SHOW GETS = Update method

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

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

• Terminate on Selection (Screen Builder) = TerminateRead Property

• Title (Screen Creator) = Title Property

• Valid (screen creator) = Click event, DblClick event, LostFocus event, Valid event

• Valid error = error message

• Vertical Position (Screen Layout dialog box) = Top Property

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

• Width (Screen Builder) = Width Property

Tool Differences

Although some of the Visual FoxPro tools are the same as those in FoxPro 2.6, there are several Visual FoxPro tools that are different or have different functionality. Here is a summary 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) = Design toolbox

• Screen Builder toolbox = Form Controls toolbox

• Control dialogs and screen layout dialogs = Properties window

• Menu Creator = Menu Designer

• RQBE = Query Designer

• Report Writer = Report Designer

• Label Designer = Label Designer

• View Window Options = Tools Menu Items

• Transport = Conversion Options dialog box

• Navigation Window = Grid Control

Keystroke Differences

There are some differences in the way that the latest versions of FoxPro and FoxPro 2.6 define some of their navigation key combinations. Below are some of the more 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)

Make the program in the editing window

• Ctrl+O (FoxPro 2.6)

• Ctrl + E (VFP)

Enter null values ​​in null-enabled fields

• Ctrl + 0 (Visual Fox Pro)

Disable the ability for users to enter null values ​​in null-enabled fields

• In label: Ctrl + 0 (VFP)

screen differences

Although you can run unconverted FoxPro 2.6 display (.spr) files in Visual FoxPro, Visual FoxPro forms use code in events, methods, and property settings rather than code snippets. Some of these differences are highlighted below.

• (FoxPro 2.6 functionality = VFP functionality)

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

• #Section 1 Configuration Code = Load Event Form Set

• #Section 2 configuration code = Form Load Event

• Clean code except procedures = discharge event

• Code snippets = Code and properties of methods and events

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

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

• READ = WindowType property

Report and label the differences

Although you can use unconverted FoxPro 2.6 reports and labels in Visual FoxPro, with Visual FoxPro reports and labels, you can configure and control the data environment 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 the “Position Relative To” options = May require adjustment in Visual

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

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

• REPORT ENVIRONMENT TAG ENVIRONMENT = Data Environment (View menu) (see “Setting Up Reports and Data Sources” and “Controlling Report Data Sources” in the Visual FoxPro help file)

Leave a Reply

Your email address will not be published. Required fields are marked *