Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : CANS_101.ZIP
Filename : MENU.PRG

 
Output of file : MENU.PRG contained in archive : CANS_101.ZIP
*-----------------------------------------------------------------
*
* System Name: Beer Cans Inventory System
*
* Program Name: MENU.PRG
*
* Programmer: Eric L. Poole
* Date: 17 February 1988
*
* Purpose: To provide menu-driven, user-friendly interface
* for executing DBASE 3 + programs associated with
* operating and maintaining the system.
*
*-----------------------------------------------------------------

* ---------- Initialize.

use cans.dbf index browse.ndx
set status off

* ---------- Display Logo Screen.

do logo_3

* ---------- Begin.

clear

do while .t.

set color to w+/b,gr+/ ,b
clear
set talk off
t_date=date()

* ---------- Create Menu Options.

opt1 = " 1. Add New Records"
opt2 = " 2. Edit/Delete Existing Records"
opt3 = " 3. Browse Records in Data Base"
opt4 = " 4. Reports Menu"
opt5 = " 5. dBASE Assist Mode"
opt6 = " 6. dBASE Dot Prompt Mode"
opt7 = " 7. Backup Files Menu"
opt8 = " 8. System Documentation Menu"
opt9 = " 9. Exit to DOS"

* ---------- Display the Menu.

clear

set color to r+
@ 1,1 to 3,78 double

set color to b+
@ 2,2 say " * * * "
set color to w+/b
@ 2,3 say dtoc(t_date)
set color to gr+/
@ 2,36 say "Main Menu"
set color to b+
@ 2,45 say " * * * "
set color to w+/b
@ 2,69 say time()

set color to w+/b,gr+/ ,b

@ 5,23 say opt1
@ 6,23 say opt2
@ 7,23 say opt3
@ 8,23 say opt4
@ 9,23 say opt5
@10,23 say opt6
@11,23 say opt7
@12,23 say opt8
@13,23 say opt9

* ---------- Display Instructions with Graphics Characters.

set color to g+/ ,g/ ,b

@ 17,10 to 20,68 double

set color to gr/ ,gr+/ ,b

@ 18,11 say " Highlight option by using "
set color to bg+/
@ 18,44 say chr(24)
set color to gr/
@ 18,45 say " or "
set color to bg+/
@ 18,49 say chr(25)
set color to gr/
@ 18,50 say " and press "
set color to rb+/
@ 18,61 say chr(17)+chr(217)
set color to gr/
@ 18,63 say " "
@ 19,11 say " or press appropriate menu number "

set color to w+/b,gr+/ ,b

* ---------- Initialize Memory Variables.

opt = 1
sub = str(opt,1)
keypress = 0
choice = 0
redraw = "N"

* ---------- Set Reverse Video on Option 1.

@ 5,23 get opt1
clear gets

* ---------- Loop for Selecting Menu Options.

do while redraw = "N"

* ---------- Wait for a Key Press.

keypress = 0

do while keypress = 0
keypress = inkey()
@ 2,69 say time()
enddo (keypress)

* ---------- Arrow Key Pressed.

if keypress = 24 .or. keypress = 5
@ opt+4,23 say opt&sub
opt=iif(keypress=24,opt+1,opt-1)
opt=iif(opt>9,1,opt)
opt=iif(opt<1,9,opt)
sub=str(opt,1)
@ opt+4,23 get opt&sub
clear gets
loop
endif

* ---------- Option Number Entered.

if keypress >= 49 .and. keypress <= 57
choice = keypress-48
endif

* ---------- Return Key Pressed.

if keypress = 13
choice = opt
endif

* ---------- An Option was Selected.

do case
case choice = 1
do add.prg
redraw = "Y"
case choice = 2
do update.prg
redraw = "Y"
case choice = 3
set color to b/w,w+/r
set index to browse.ndx
clear
browse
set index to
redraw = "Y"
case choice = 4
do reports.prg
redraw = "Y"
case choice = 5
assist
redraw = "Y"
case choice = 6
clear
set status on
set color to w+/r
@19,0 say "DBASE Dot Prompt Mode"
set color to bg+/
@20,0 say "To return to Main Menu, type "
set color to gr+
@20,29 say "DO MENU"
set color to bg+/
@20,36 say " and press "
set color to r+/
@20,47 say chr(17)+chr(217)
set color to b/w
return
case choice = 7
do backup.prg
redraw = "Y"
case choice = 8
do listdoc.prg
redraw = "Y"
case choice = 9

* ---------- Close Databases, Exit DBASE 3+, and Return to DOS.

close databases
quit
endcase

enddo (while return = "N")

enddo (while .t.)



  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : CANS_101.ZIP
Filename : MENU.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/