What Is The Difference Between Foxpro And Visual Foxpro


by dhwake - Date: 2010-08-03 - Word Count: 1268 Share This!

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 and FoxPro is that Visual FoxPro distinguishes between databases and tables. While tables from FoxPro 2.6 still work in Visual FoxPro, they will be saved as Visual FoxPro 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 Visual FoxPro Help file.)
• General field size = Now 4 bytes. (See "General Field Type" in the Visual FoxPro Help file.)
• Memo field size = Now 4 bytes. (See "Memo Field Type" in the Visual FoxPro Help file.)
• Memo field with NOCPTRANS Characteristic = Memo (BINARY) field type. (See "Data and Field Types" in the Visual FoxPro 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 = Visual FoxPro 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 Visual FoxPro Help file.)
• Code snippets = Properties, methods, and event code.(See "Setting Properties at Design Time" and "Assigning Method and Event Code" in the Visual FoxPro 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 Visual FoxPro. There are several commands for FoxPro 2.6 that have modified or enhanced capabilities in Visual FoxPro. 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 = Visual FoxPro 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
• DBCONNECT = SQLCONNECT( ) Function
• DBEXEC = SQLEXEC( ) Function
• DEACTIVATE MENU, DEACTIVATE POPUP, DEACTIVATE WINDOW = Deactivate Event
• @ ... GET DEFAULT = Default property
• DEFINE WINDOW CLOSE = Closable property
• DEFINE WINDOW FLOAT = Movable property
• DEFINE WINDOW HALFHEIGHT = HalfHeightCaption property
• DEFINE WINDOW ICON FILE = Icon 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
• MODIFY SCREEN = MODIFY FORM command
• MODIFY STRUCTURE = TABLE Designer
• 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 Visual FoxPro 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 = Visual FoxPro 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 Visual 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 (Visual FoxPro)
Add a record to a browse window
• Ctrl + N (FoxPro 2.6)
• Ctrl + Y (Visual FoxPro)
Do program in edit window
• Ctrl + O (FoxPro 2.6)
• Ctrl + E (Visual FoxPro)
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 (Visual FoxPro)

Screen Differences
While you are able to run unconverted FoxPro 2.6 screen files (.spr) in Visual FoxPro, 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 = Visual FoxPro Functionality)
• #DEFINE, #INSERT preprocessor statements = Global include file called by new .SPR file. (See "Checking the .SPR File" in the Visual FoxPro Help 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 = Visual FoxPro 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)

Related Tags: foxpro, visual foxpro

Your Article Search Directory : Find in Articles

© The article above is copyrighted by it's author. You're allowed to distribute this work according to the Creative Commons Attribution-NoDerivs license.
 

Recent articles in this category:



Most viewed articles in this category: