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

 
Output of file : DRAWMEN1.PRG contained in archive : STRALEY.ZIP

********************
* Name DRAWMENU.prg
* Date August 12, 1986
* Notice Copywright 1986, Stephen J. Straley
* Note This sample code shows how to develop menus as
* they move down to more specific options; how screens
* may be saved and recalled (especially in conjunction
* with arrays); and how BOXes are drawn.
*
********************

STORE CHR(201) + CHR(205) + CHR(187) + CHR(186) + ;
CHR(188) + CHR(205) + CHR(200) + CHR(186) + " " TO scrframe
SET INTENS on
SET DELIM off
prompt = "Enter Choice: "
disp0_1 = " 1> Chart Of Accounts "
disp0_2 = " 2> Transactions "
disp0_3 = " 3> Posting & Balancing "
disp0_4 = " 4> Transfers "
disp0_5 = " 5> Print Lists / Checks "
disp0_6 = " 6> Print Reports "
disp0_7 = " 7> Utilities "
disp0_8 = " 8> End of Period "
disp0_0 = " 0> Exit Program "
disp1_1 = " 1> Enter an Account "
disp1_2 = " 2> Edit an Account "
disp1_3 = " 3> Examine Accounts "
disp1_4 = " 4> Delete an Account "
disp1_0 = " 0> Return to Main Menu "
disp2_1 = " 1> Enter Transaction "
disp2_2 = " 2> Edit Transaction "
disp2_3 = " 3> Delete Transaction "
disp2_0 = " 0> Return to Main Menu "
disp5_1 = " 1> Chart of Account Info. "
disp5_2 = " 2> Print/Reprint Checks "
disp5_3 = " 3> Transaction Information "
disp5_4 = " 4> Heading Listings "
disp5_0 = " 0> Return to Main Menu "
DO WHILE .T.
option = "0"
CLEAR
@ 5,0,20,79 BOX SUBSTR(scrframe,1,8)
@ 4,33 SAY "M A I N M E N U"
@ 7,10 SAY "1> Chart Of Accounts"
@ 10,10 SAY "2> Transactions"
@ 13,10 SAY "3> Posting & Balancing"
@ 16,10 SAY "4> Transfers"
@ 7,50 SAY "5> Print Lists / Checks"
@ 10,50 SAY "6> Print Reports"
@ 13,50 SAY "7> Utilities"
@ 16,50 SAY "8> End of Period"
@ 18,30 SAY "0> Exit Program"
@ 22,30 SAY prompt GET option PICT "9" VALID(option $"012345678")
READ
DO CASE
CASE option = "1"
@ 7,9 GET disp0_1
CLEAR GETS
@ 12,37,22,76 BOX scrframe
@ 13,44 SAY "Chart Of Accounts Sub-Menu"
@ 15,46 SAY "1> Enter an Account"
@ 16,46 SAY "2> Edit an Account"
@ 17,46 SAY "3> Examine Accounts"
@ 18,46 SAY "4> Delete an Account"
@ 19,46 SAY "0> Return to Main Menu"
@ 21,47 SAY prompt GET option PICT "9" VALID(option $"0")
READ

CASE option = "3"
STORE "0" TO option
@ 13, 9 GET disp0_3
CLEAR GETS
@ 10,37,18,76 BOX scrframe
@ 11,47 SAY "Post/Balance Sub-Menu"
@ 13,45 SAY "1> Post Transactions"
@ 14,45 SAY "2> Balance Accounts"
@ 15,45 SAY "0> Return to Main Menu"
@ 17,47 SAY prompt GET option PICT "9" VALID(option $"0")
READ

CASE option = "5"
STORE "0" TO option, suboption
@ 7,49 GET disp0_5
CLEAR GETS
@ 9,3,19,43 BOX scrframe
@ 10,11 SAY "Print Lists/Checks Sub-Menu"
@ 12,10 SAY "1> Chart of Account Info."
@ 13,10 SAY "2> Print/Reprint Checks"
@ 14,10 SAY "3> Transaction Information"
@ 15,10 SAY "4> Heading Listings"
@ 16,10 SAY "0> Return to Main Menu"
@ 18,12 SAY prompt GET option PICT "9" VALID(option $"01234")
READ
DO CASE
CASE option = "0"
@ 16,09 GET disp5_0
CLEAR GETS
LOOP
CASE option = "1"
@ 12, 9 GET disp5_1
CLEAR GETS
@ 6,40,16,77 BOX scrframe
@ 7,46 SAY " Printing Chart of Accounts"
@ 9,49 SAY "1> Account Listing"
@ 10,49 SAY "2> Account History"
@ 11,49 SAY "3> Budget Listing"
@ 12,49 SAY "0> Return to Main Menu"
@ 14,49 SAY prompt GET suboption PICT "9" VALID(suboption $"0123")
READ

CASE option = "2"
@ 13, 9 GET disp5_2
CLEAR GETS
@ 6,37,15,76 BOX scrframe
@ 7, 43 SAY " Re/Print Checks"
@ 9, 45 SAY "1> Print Checks"
@ 10,45 SAY "2> Reprint Checks"
@ 11,45 SAY "3> Print Check Registar"
@ 12,45 SAY "0> Return to Main Menu"
@ 14,46 SAY Prompt GET suboption PICT "9" VALID(suboption $"0123")
READ

CASE option = "3"
@ 14, 9 GET disp5_3
CLEAR GETS
@ 6,37,17,76 BOX scrframe
@ 7,43 SAY " Print Transaction List"
@ 9,45 SAY "1> By Transaction Code"
@ 10,45 SAY "2> By Transaction Source"
@ 11,45 SAY "3> By Date of Transaction"
@ 12,45 SAY "4> By Account Order"
@ 13,45 SAY "5> All Transactions"
@ 14,45 SAY "0> Return to Main Menu"
@ 16,48 SAY prompt GET suboption PICT "9" VALID(suboption $"012345")
READ

CASE option = "4"
@ 15, 9 GET disp5_4
CLEAR GETS
@ 6,37,15,76 BOX scrframe
@ 7,42 SAY " List General Headings Sub-Menu"
@ 9,42 SAY "1> List Master/Sub Masters"
@ 10,42 SAY "2> List Subheadings/Subtotals"
@ 11,42 SAY "3> List All"
@ 12,42 SAY "0> Return to Sub Menu"
@ 14,45 SAY prompt GET suboption PICT "9" VALID(suboption $"0123")
READ

ENDCASE

CASE option = "7"

CASE option = "2"
STORE "0" TO option
@ 10, 9 GET disp0_2
CLEAR GETS
@ 8,37,17,76 BOX scrframe
@ 9,47 SAY "Transaction Sub-Menu"
@ 11,45 SAY "1> Enter Transaction"
@ 12,45 SAY "2> Edit Transaction"
@ 13,45 SAY "3> Delete Transaction"
@ 14,45 SAY "0> Return to Main Menu"
@ 16,48 SAY prompt GET option PICT "9" VALID(option $"0")
READ

CASE option = "4"
STORE "0" TO option
@ 16, 9 GET disp0_4
CLEAR GETS
@ 9,37,22,76 BOX scrframe
@ 10,47 SAY "Transfer Data Sub-Menu"
@ 12,41 SAY "1> Transfer Accounts Receivable"
@ 13,41 SAY "2> Transfer Payroll"
@ 14,41 SAY "3> Transfer Accounts Payable"
@ 15,41 SAY "4> Transfer Inventory"
@ 16,41 SAY "5> Transfer Other Systems"
@ 17,41 SAY "6> Transfer Outside Systems"
@ 18,41 SAY "7> Post Transfers"
@ 19,41 SAY "0> Return to Main Menu"
@ 21,45 SAY prompt GET option PICT "9" VALID(option $"0")
READ

CASE option = "6"
STORE "0" TO option
@ 10,49 GET disp0_6
CLEAR GETS
@ 9,3,18,43 BOX scrframe
@ 10,12 SAY "Print Reports Sub-Menu"
@ 12, 8 SAY "1> Print Trial Balance"
@ 13, 8 SAY "2> Print Statement of Income"
@ 14, 8 SAY "3> Print Balance Sheet"
@ 15, 8 SAY "0> Return to Main Menu"
@ 17,11 SAY prompt GET option PICT "9" VALID(option $"0")
READ

CASE option = "8"
STORE "0" TO option
@ 16,49 GET disp0_8
CLEAR GETS
@ 7,2,17,38 BOX scrframe
@ 8, 8 SAY "End of Period Processing"
@ 9,16 SAY "Sub-Menu"
@ 11,10 SAY "1> End of Month"
@ 12,10 SAY "2> End of Quarter"
@ 13,10 SAY "3> End of Year"
@ 14,10 SAY "0> Return to Main Menu"
@ 16,11 SAY prompt GET option PICT "9" VALID(option $"0123")
READ

CASE option = "0"
@ 18,29 GET disp0_0
CLEAR GETS
CLOSE
@ 22,17 SAY "All Files Closed. Returning to Operating System"
QUIT
ENDCASE

ENDDO

* End of File


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : STRALEY.ZIP
Filename : DRAWMEN1.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/