Category : Files from Magazines
Archive   : PJ91.ZIP
Filename : MENUTEST.PRG

 
Output of file : MENUTEST.PRG contained in archive : PJ91.ZIP
** MENUTEST.prg
* Author: M. Steven Baker

*** Sample code to illustrate using MENUKEY

PUBLIC menubar(10), menuhelp(10)
PUBLIC menuchoice, menusel, menuline, remenu, choice

CLEAR

SET MENU OFF
SET STATUS OFF
SET SCOREBOARD OFF
SET DELETE ON
SET EXACT ON
SET ESCAPE OFF

SET BELL OFF
SET TALK OFF


****** The VIEW DATA MENU screen
repaint = .T. && must repaint the whole screen
rewindow = .T. && must repaint the window
remenu = .T.
menusel = 1

DO WHILE .T.
IF (repaint)
*------ clear windows
SET COLOR to W/N
clear
@ 0,27 to 2,52 DOUBLE && draw header box
@ 2,3 to 22,76 DOUBLE
@ 2,27 SAY CHR(202)
@ 2,52 SAY CHR(202)

*------- write header in bold
SET COLOR TO W+/N
@ 1,31 SAY "View Resource Data"
SET COLOR to W/N
*------ write out some sample sub-titles at top
@ 3,5 SAY "EPA Reach #"
@ 4,5 SAY "River Name:"
repaint = .F.
ENDIF
IF (remenu)
SET COLOR TO W/N
*----------- our MENU BAR line
menuline = "Next Previous Downstream Upstream " + ;
"Trib Resources Flow Quit"
menuchoice = "NPDUTRFQ"
menu_max = 8
menubar(1) = "03Next"
menubar(2) = "09Previous"
menubar(3) = "19Downstream"
menubar(4) = "31Upstream"
menubar(5) = "41Trib"
menubar(6) = "47Resources"
menubar(7) = "58Flow"
menubar(8) = "64Quit"
menuhelp(1) = "view Next river reach (alphabetic by name)"
menuhelp(2) = "view Previous river reach (alphabetic by name)"
menuhelp(3) = "view Downstream river reach"
menuhelp(4) = "view Upstream river reach"
menuhelp(5) = "view the upstream Tributary river reach"
menuhelp(6) = "view detailed Resource values for this river reach"
menuhelp(7) = "view detailed Flow and water quality data"
menuhelp(8) = "Quit to master menu"
ENDIF && remenu

badkey = .T.
DO WHILE (badkey)
do menukey
badkey = .F.
DO CASE
CASE Choice = 'N'
CASE Choice = 'P'
CASE Choice = 'D'
CASE Choice = 'U'
CASE Choice = 'T'
CASE Choice = 'R'
CASE Choice = 'F'
* DO something
@ 0,60 SAY "Good Input-"+Choice
CASE Choice = 'Q'
RETURN TO MASTER
OTHERWISE
badkey = .T.
ENDCASE
ENDDO && do while(badkey)
ENDDO && the main true loop


  3 Responses to “Category : Files from Magazines
Archive   : PJ91.ZIP
Filename : MENUTEST.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/