Basics of Visual FoxPro Programming
Basics of Visual FoxPro Programming
Basics of Visual FoxPro Programming
Objectives:
Project
Database
Table
Form
Report
Menu
What To Learn in Visual Fox Pro cont.
Textbox
Command Button
Option Group
Check Box
Combo Box
List Box
Page frame
Image frame
Timer
What To Learn in Visual Fox Pro cont.
Add
Save
Delete
Search
Next Button
Back Button
Timer
Working with Command Window
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.
•
REPLACE to change the contents in more than one record.
Working with Command Window
Browse - This is a
powerful editing command
provide us facility to edit
records horizontally with
showing us multiple
records at a time.
Working with Command Window
Replace - This is a
powerful editing
command. This is used to
replace a new
value in a field with or
without a condition.
Working with Command Window
Replace - This is a
powerful editing
command. This is used to
replace a new
value in a field with or
without a condition.
Working with Command Window
Run command
Syntax:
Run [/n]
Set Default
Syntax:
Set Default To [cPath]
Project
From the menu click File
Select New
Project Manager
Creating Control Object
Table
From the menu click File
Select New
Table
Creating Control Object
Form
From the menu click File
Select New
Form
Creating Control Object
Report
From the menu click File
Select New
Report
Creating Control Object
Menu
From the menu click File
Select New
Menu
Building Control Objects
Command
Check Box
List Box
Group Timer
Command
Textbox Option Combo
Button Box Image
Page Frame
Button
Text Box
Alignment: center
PasswordChar: *
BackStyle: 0-Transparent
BorderStyle: 0-None
Building Control Object
Command Button
Caption: Save
Picture:
Building Control Object
Option Group
Value =:0
Caption: Yes/No
BackStyle: 0- Transparent
BorderStyle: 0- None
Building Control Object
Check Box
Check Box
Building Control Object
Combo Box
List Box
Page Frame
select item2
append blank
thisform.txticode.setfocus
thisform.refresh
Basic Codes of Fox Pro
Save
With thisform
Select item2
Append blank
Replace icode with thisform.txtcode.value
Thisform.refresh
endwith
Basic Codes of Fox Pro
Delete
WITH thisform
select item2
delete
thisform.refresh
ENDwith
Basic Codes of Fox Pro
Search
select item2
if !eof() then
skip+1
thisform.refresh
else
messagebox("end of Records")
goto top
thisform.refresh
endif
Basic Codes of Fox Pro
Back Button
select item2
if !bof() then
skip-1
thisform.refresh
else
messagebox("beggining of Records")
goto top
thisform.refresh
endif
Simple Activity