Download - Foxpro Tutorial d
-
7/28/2019 Foxpro Tutorial d
1/21
Tutorial: FoxPro D - Database Procedures &Screen Forms
Dr. Thomas E. Hicks
Computer Science DepartmentTrinity University
1. Main Program
2. Decide The Size For The New Screen
3. Creating Your First Screen - Quick Form
4. Changing The Caption Of The Text Box Control
5. Changing Form Color
6. Changing The Font Size Of The Text Box Control
7. Changing The Font Boldness Of The Text Box Control
8. Changing The Font Colors Of The Text Box Control9. Sizing The Text Box Control To Fit
10. Changing The Font Size Of The Edit Box Control
11. Changing The Font Boldness Of The Edit Box Control
12. Changing The Font Colors Of The Edit Box Control
13. Sizing The Edit Box Control To Fit
14. Screen Layout
15. Changing Screen Title
16. Next Button Code
17. Changing The Caption Of The Next Push Button Control
18. Linking The Push Button Control With Procedure Next
19. Starting the Main Program20. Previous Button Code
21. Changing The Caption Of The Previous Push Button Control
22. Linking The Previous Push Button Control With Procedure Previous
23. Delete Button Code
24. Changing The Caption Of The Delete Push Button Control
25. Linking The Previous Push Button Control With Procedure Delete
26. Add Button Code
27. Changing The Caption Of The Add Push Button Control
28. Linking The Previous Push Button Control With Procedure Add
29. Exit Button Code
30. Changing The Caption Of The Exit Push Button Control
31. Linking The Previous Push Button Control With Procedure Exit
32. Sample Button Layouts
33. Possible Exam/Quiz Questions - FoxPro D
All of the following FoxPro Commands Can Be Entered Into The Command Window (these commands are not case sensitive
Download and decompress the data file for this example and design your own FoxProapplication as you walk through the tutorial.
Products1.zip Installing WinZip Tutorial Using WinZip Tutorial
http://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Main%20Program%23Main%20Programhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Decide%20The%20Size%20For%20The%20New%20Screen%23Decide%20The%20Size%20For%20The%20New%20Screenhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Creating%20Your%20First%20Screen%20-%20Quick%20Form%23Creating%20Your%20First%20Screen%20-%20Quick%20Formhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20The%20Text%20Box%20Control%23Changing%20The%20Caption%20Of%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20The%20Text%20Box%20Control%23Changing%20The%20Caption%20Of%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20Form%20Color%23Changing%20Form%20Colorhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Size%20Of%20%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Size%20Of%20%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Boldness%20Of%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Boldness%20Of%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Boldness%20Of%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Boldness%20Of%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Colors%20Of%20%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Colors%20Of%20%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Colors%20Of%20%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Colors%20Of%20%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Sizing%20The%20Text%20Box%20Control%20To%20Fit%23Sizing%20The%20Text%20Box%20Control%20To%20Fithttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Size%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Size%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Boldness%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Boldness%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Boldness%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Boldness%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Colors%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Colors%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Sizing%20The%20Edit%20Box%20Control%20To%20Fit%23Sizing%20The%20Edit%20Box%20Control%20To%20Fithttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Screen%20Layout%23Screen%20Layouthttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20Screen%20Title%23Changing%20Screen%20Titlehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Next%20Button%23Next%20Buttonhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Next%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Next%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Next%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Next%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Push%20Button%20Control%20With%20Procedure%20Next%23Linking%20The%20Push%20Button%20Control%20With%20Procedure%20Nexthttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Starting%20the%20Main%20Program%23Starting%20the%20Main%20Programhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Previous%20Button%20Code%23Previous%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Previous%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Previous%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Previous%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Previoushttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Delete%20Button%20Code%23Delete%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Delete%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Delete%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Delete%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Delete%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Delete%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Deletehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Add%20Button%20Code%23Add%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Add%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Add%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Add%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Addhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Exit%20%20Button%20Code%23Exit%20%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Exit%20%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Exit%20%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Exit%20%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Exit%20%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Exit%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Exithttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Sample%20Button%20Layouts%23Sample%20Button%20Layoutshttp://www.cs.trinity.edu/~thicks/Tutorials/Database-FormGuidelines/Database-Files/Products1.ziphttp://www.cs.trinity.edu/WinZip/InstallWinZip.htmlhttp://www.cs.trinity.edu/WinZip/UsingWinZip.htmlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Decide%20The%20Size%20For%20The%20New%20Screen%23Decide%20The%20Size%20For%20The%20New%20Screenhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Creating%20Your%20First%20Screen%20-%20Quick%20Form%23Creating%20Your%20First%20Screen%20-%20Quick%20Formhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20The%20Text%20Box%20Control%23Changing%20The%20Caption%20Of%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20Form%20Color%23Changing%20Form%20Colorhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Size%20Of%20%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Size%20Of%20%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Boldness%20Of%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Boldness%20Of%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Colors%20Of%20%20The%20Text%20Box%20Control%23Changing%20The%20Font%20Colors%20Of%20%20The%20Text%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Sizing%20The%20Text%20Box%20Control%20To%20Fit%23Sizing%20The%20Text%20Box%20Control%20To%20Fithttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Size%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Size%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Boldness%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Boldness%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Font%20Colors%20Of%20The%20Edit%20Box%20Control%23Changing%20The%20Font%20Colors%20Of%20The%20Edit%20Box%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Sizing%20The%20Edit%20Box%20Control%20To%20Fit%23Sizing%20The%20Edit%20Box%20Control%20To%20Fithttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Screen%20Layout%23Screen%20Layouthttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20Screen%20Title%23Changing%20Screen%20Titlehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Next%20Button%23Next%20Buttonhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Next%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Next%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Push%20Button%20Control%20With%20Procedure%20Next%23Linking%20The%20Push%20Button%20Control%20With%20Procedure%20Nexthttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Starting%20the%20Main%20Program%23Starting%20the%20Main%20Programhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Previous%20Button%20Code%23Previous%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Previous%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Previous%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Previous%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Previoushttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Delete%20Button%20Code%23Delete%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Delete%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Delete%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Delete%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Deletehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Add%20Button%20Code%23Add%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Add%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Add%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Add%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Addhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Exit%20%20Button%20Code%23Exit%20%20Button%20Codehttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Changing%20The%20Caption%20Of%20%20The%20Exit%20%20Push%20Button%20Control%23Changing%20The%20Caption%20Of%20%20The%20Exit%20%20Push%20Button%20Controlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Exit%23Linking%20The%20Previous%20Push%20Button%20Control%20With%20Procedure%20Exithttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Sample%20Button%20Layouts%23Sample%20Button%20Layoutshttp://www.cs.trinity.edu/~thicks/Tutorials/Database-FormGuidelines/Database-Files/Products1.ziphttp://www.cs.trinity.edu/WinZip/InstallWinZip.htmlhttp://www.cs.trinity.edu/WinZip/UsingWinZip.htmlhttp://www.cs.trinity.edu/~thicks/Tutorials/FoxPro-D-ProceduresScreenForms/FoxProD.html#Main%20Program%23Main%20Program -
7/28/2019 Foxpro Tutorial d
2/21
Create a folder, called Products, in the Temp folder of hard drive C; your directoryC:\Temp\Products should look like the following:
Windows 95/NT Tutorial
Structure for table: C:\TEMP\PRODUCTS\PRODUCTS.DBF
Number of data records: 77
Date of last update: 02/27/98
Memo file block size: 64
Code Page: 1252
Field Field Name Type Width Dec
1 PRODUCTID Character 6
2 SUPPLIERID Character 6
3 PRODNAME Character 40
4 ENGNAME Character 50
5 QTYSIZE Character 20
6 UNITPRICE Numeric 8 2
7 UNITCOST Numeric 8 2
8 QTYINSTOCK Numeric 12 3
9 MINQTYTOST Numeric 12 3
10 DISCONTINU Logical 1
11 LASTORDER Date 8
12 INFO Memo
Main Program
In order to avoid typing a lot of stuff in the command line each time we wish to start ourapplication, let us design a good Main.PRG (Do It!)
Modify Command Main
Set Default To C:\Temp\Products
-
7/28/2019 Foxpro Tutorial d
3/21
Using the mouse, select the Set As Default button. (Do It!)
Until this configuration is changed, all new screens will be designed for low resolution 640 x
480 monitors with snap to grid set to 6 pixels.
Creating Your First Screen - Quick Form
Create Screen Products
-
7/28/2019 Foxpro Tutorial d
4/21
Using the mouse, hold down the form menu and select QuickForm as illustrated above. Aform builder will now emerge. As is the case with the other FoxPro Menus, the Form Control
menu may be in the menubar at the top, may be loose on the screen (as illustrated above) ormay be closed. If closed, the toolbar may be opened by holding down the View Menu andselecting Forms Control Tool Bar.
Used to add the selected field from the Products database table to the Selected Fields listused to construct controls for the new form.
-
7/28/2019 Foxpro Tutorial d
5/21
Used to add all fields from the Products database table to the Selected Fields list used toconstruct controls for the new form.
Used to remove the selected field from the Selected Fields list.
Used to remove all fields from the Selected Fields list.
Let us select all fields. (See Below)
Select the Tab form builder. (See Below)
-
7/28/2019 Foxpro Tutorial d
6/21
Select the Embossed Style and Select the OK button. (See Below)
FoxPro has now given its best shot at an automated form for the Products database table.
Changing The Caption Of The Text Box Control
The text box control is used to present text information, such as field prompts, on the user
-
7/28/2019 Foxpro Tutorial d
7/21
designed screen forms. When using the quick form, the field names have been selected asprompts; field names are often make very poor prompts; examples of poor prompts would beevident in the captions on the screen above : Productid, Unitprice, Lastorder, etc. Theobjective is to make each and every caption so explicit, that all can use the database screenwithout the need for clarification of data.
Each caption/prompt is a text box control object whose properties may be altered. Let uschange the caption of Productid to Product ID #. First use the mouse and select the text boxcontrol; when selected, a box will appear around the text box.
Second let us activate the Properties Box by holding down the right mouse button on theobject and selecting Properties as demonstrated above. The Properties Box is illustrated
below. This step may be omitted when the properties box is already on the desktop.
In order to change the text box control caption :
select the text box control
select Caption in the Properties Box
-
7/28/2019 Foxpro Tutorial d
8/21
enter the desired caption in the edit box [shaded pink for identification and marked
with red arrow]
It will be in the edit box of the Properties Box that many of the screen objects are changed. Inthe screen below, most of the captions have been changed.
Original Value New Value
Productid: Product ID #Supplierid: Supplier ID #Productname: DescriptionEngname: NameQtysize: Quantity SizeUnitprice: Unit PriceUnicost: Unit CostQtyinstock: In StockMinqtytost: MinimumDiscontinu: DiscontinuedLastorder: Last OrderedInfo: ----------- Prompt removed
Some of the new caption information seems to be missing in the screen below; relax, since
the text box control field retains its original size, some of the data is simply hidden at themoment. Shortly, I will show you how to resize the text box control field so that all of eachcaption might be displayed.
This button, from the form controls tool bar, can be used to add a new text box control to ascreen.
Changing Form Color
In order to make the text box control bold
select the form - touch anywhere on the form except a control or button
select BackColor in the Properties Box
enter the RGB [Red,Green,Blue] code in the edit window or press for a color
chart. (See Below)
-
7/28/2019 Foxpro Tutorial d
9/21
athomas.
Custom colors may be configured as well. (See Below)
Changing The Font Size Of The Text Box Control
In order to change the text box control font size select the text box control(s)
select FontSize in the Properties Box
enter the desired size in the edit box or select from the edit box pull down menu
(See Below)
-
7/28/2019 Foxpro Tutorial d
10/21
You may use your mouse and select multiple text box controls to change at one time; holddown the shift key to continue selections.
Changing The Font Boldness Of The Text Box Control
In order to make the text box control bold select the text box control(s)
select FontBold in the Properties Box
select True from the edit box pull down menu or double click FontBold selection to
change (See Below)
In order to make the text box control unbold
select the text box control(s)
select FontBold in the Properties Box
select False from the edit box pull down menu or double click FontBold selection to
change
-
7/28/2019 Foxpro Tutorial d
11/21
You may use your mouse and select multiple text box controls to change at one time; holddown the shift key to continue selections.
Changing The Font Colors Of The Text Box Control
In order to change the font color select the text box control(s)
select ForeColor in the Properties Box
enter the RGB [Red,Green,Blue] code in the edit window or press for a color
chart. (See Below)
You may use your mouse and select multiple text box controls to change at one time; holddown the shift key to continue selections.
Sizing The Text Box Control To Fit
In order to change the text box control to the correct size for the caption select the text box control(s)
select ForeColor in the Properties Box
enter the RGB [Red,Green,Blue] code in the edit window or press for a color
chart. (See Below)
Changing The Font Size Of The Edit Box Control
-
7/28/2019 Foxpro Tutorial d
12/21
In order to change the edit box control font size select the edit box control(s)
select FontSize in the Properties Box
enter the desired size in the edit box or select from the edit box pull down menu
(See Below)
You may use your mouse and select multiple text box controls to change at one time; holddown the shift key to continue selections.
This button, from the form controls tool bar, can be used to add a new edit box control to ascreen.
Changing The Font Boldness Of The Edit Box Control
In order to make the edit box control bold
select the edit box control(s)
select FontBold in the Properties Box
select True from the edit box pull down menu or double click FontBold selection to
change (See Below)
-
7/28/2019 Foxpro Tutorial d
13/21
In order to make the edit box control unbold
select the edit box control(s)
select FontBold in the Properties Box
select False from the edit box pull down menu or double click FontBold selection to
change
You may use your mouse and select multiple text box controls to change at one time; holddown the shift key to continue selections.
Changing The Font Colors Of The Edit Box Control
In order to change the font color select the edit box control(s)
select ForeColor in the Properties Box
enter the RGB [Red,Green,Blue] code in the edit window or press for a color
chart. (See Below)
In order to change the font background color
-
7/28/2019 Foxpro Tutorial d
14/21
select the edit box control(s)
select BackColor in the Properties Box
enter the RGB [Red,Green,Blue] code in the edit window or press for a colorchart.
You may use your mouse and select multiple text box controls to change at one time; holddown the shift key to continue selections.
Sizing The Edit Box Control To Fit
In order to change the text box control to the correct size for the caption select the edit box control(s)
select ForeColor in the Properties Box
enter the RGB [Red,Green,Blue] code in the edit window or press for a colorchart. (See Below)
Screen Layout
The mouse can be used to re-position objects on the screen in a drag and drop process.
I. Put the most important information at the top of the screen.
II. Most screens should contain 1 - 3 columns
III. Avoid wild color combinations.
IV. Avoid too many different size fonts.
V. Try to avoid large gaps on the page.
-
7/28/2019 Foxpro Tutorial d
15/21
VI. Align the prompt captions and the edit fields. The captions below need help. Select the leftrow of captions with the mouse on the screen below. Pull down the Format Menu and SelectAlign and select Align Right Sides.
The results of the right alignment may be seen below. This will also be done with the leftcolumn.
FoxPro also makes it very easy to achieve horizontal alignment in each row. Select the leftrow of captions with the mouse on the screen below.
-
7/28/2019 Foxpro Tutorial d
16/21
Pull down the Format Menu and Select Align and select Align Right Sides.
With proper alignment, our screen now looks like the following:
Changing Screen Title
In order to change the screen title from Form1
select the form - touch anywhere on the form except a control or button
select Caption in the Properties Box
enter the desired title - Be sure to include the author(s) and the table (See Below)
Next Button Code
The purpose of the Next button is to move the cursor to the next record. This button, from theform controls tool bar, can be used to add a new push button control to a screen. The NextButton should be on the far right-hand side of the screen.
The code for all buttons shall be added to a file called Code.PRG. Do It!
-
7/28/2019 Foxpro Tutorial d
17/21
modify command Code
Procedure Next
-
7/28/2019 Foxpro Tutorial d
18/21
Double click on My Computer. Double click on Temp. Double click on Products. Double click on Main.PRG
-
7/28/2019 Foxpro Tutorial d
19/21
EndProc
-
7/28/2019 Foxpro Tutorial d
20/21
The purpose of the Exit button is to exit the screen form. The Exit Button may be placedanywhere, that is organize effectively, the screen.
The code for all buttons shall be added to a file called Code.PRG. Do It! Skip a couple ofblank lines between your procedures to make them easier to find, edit, etc.
modify command Code
Procedure Exit
-
7/28/2019 Foxpro Tutorial d
21/21
Database Form Guidelines
http://www.cs.trinity.edu/~thicks/Tutorials/Database-FormGuidelines/FormGuidelines.phphttp://www.cs.trinity.edu/~thicks/Tutorials/Database-FormGuidelines/FormGuidelines.php