Objectives:
• To be able to give basic information about FoxPro
Environment.
• To give an overview about basic VFP commands.
• To give an overview about basic VFP controls.
• To give an overview about basic VFP codes.
What To Learn in Visual Fox Pro
• Working With Command Window
– Creating a New Table
– Modify the Structure of a Table
– Displaying and Editing Data
• Append Command
• Browse Command
• Replace Command
What To Learn in Visual Fox Pro cont.
• Delete and Recall Command
– Pack Command
– Zap Command
– Recall Command
• Run Command
What To Learn in Visual Fox Pro cont.
Creating Control Objects
Project
Database
Table
Form
Report
Menu
What To Learn in Visual Fox Pro cont.
Building Control Objects and its Properties
Textbox
Command Button
Option Group
Check Box
Combo Box
List Box
Page frame
Image frame
Timer
What To Learn in Visual Fox Pro cont.
Basic Codes of FoxPro
Add
Save
Delete
Search
Next Button
Back Button
Timer
Working with Command Window
The Command window is a Visual FoxPro system window. When you choose menu commands, Visual FoxPro
language commands are echoed in the Command window.
Working with Command Window
Creating New Table
Syntax :
create <table name>
To create a table file from command window type the word CREATE followed by the
name of the table file, and press Enter key.
Working with Command Window
Modify the Structure of a Table
Syntax:
Modify Structure
From the command window we can modify the structure by
typing the MODIFY
Working with Command Window
Displaying and Editing Data
Working from the command window, we can USE a table and then type one of the following:
•
APPEND to display the table in Append mode. •
BROWSE to display the table in browse mode. •
Working with Command Window
Displaying and Editing Data
APPEND - This command
is used to add records to the active database file.
Syntax:
Append
Append Blank
APPEND Blank - will add
a blank record at the bottom of the screen.
Working with Command Window
Displaying and Editing Data
Browse - This is a
powerful editing command provide us facility to edit records horizontally with
showing us multiple records at a time.
Syntax:
Working with Command Window
Displaying and Editing Data
Replace - This is a
powerful editing
command. This is used to replace a new
value in a field with or without a condition.
Syntax:
Working with Command Window
Delete and Recall Command
Replace - This is a
powerful editing
command. This is used to replace a new
value in a field with or without a condition.
Syntax:
Working with Command Window
Delete and Recall Command
Pack - This command is
used to physically remove all those records which was marked for deletion.
Syntax:
Working with Command Window
Delete and Recall Command
Zap- This command is used
to erases all records of active database except its structure.
Syntax:
Working with Command Window
Delete and Recall Command
Recall- This command is
used to unmark the specified record which was marked for deletion.
Syntax:
Working with Command Window
Run command
We can execute any DOS command or non Visual FoxPro program without quitting from Visual FoxPro.
Syntax:
Working with Command Window
Set Default
Visual FoxPro uses its default drive and directory
for
creating files, unless we specify the path separately.
Syntax:
Creating Control Object
Project
From the menu click File
Select New
Creating Control Object
Creating Control Object
Table
From the menu click File
Select New
Creating Control Object
Creating Control Object
Form
From the menu click File
Select New
Creating Control Object
Creating Control Object
Report
From the menu click File
Select New
Creating Control Object
Creating Control Object
Menu
From the menu click File
Select New
Creating Control Object
Building Control Objects
Textbox Option Button Command Button Command Group Combo Box Check Box Image List Box Timer
Page Frame
Building Control Object
Text Box
The text box is the basic control that allows users to add or edit data in a Character, Numeric, or Date
Building Control Object
Text Box Properties
Alignment: center
PasswordChar: *
BackStyle: 0-Transparent
BorderStyle: 0-None
Building Control Object
Command Button
is typically used to start an event that performs an action such as closing a form, moving to a different
Building Control Object
Command Button Properties
Caption: Save
Picture:
Building Control Object
Option Group
You can use a group of option buttons to provide a selection of predetermined choices.
Building Control Object
Option Group Properties
Value =:0
BackStyle: 0- Transparent
BorderStyle: 0- None
Building Control Object
Check Box
You can use a check box to switch between three states, True (.T.), False (.F.), and Null
Building Control Object
Building Control Object
Combo Box
Building Control Object
List Box
List boxes provide the user with a scrollable list that contains a number of options or pieces of
Building Control Object
Page Frame
A page frame is a container object that contains pages, which can contain controls.
Building Control Object
Image
is a graphical control that displays bitmaps that can't be changed directly.
Building Control Object
Timer
A typical use for the timer is checking the system clock to determine if it is time to run a program or