DECLARE SUB NumbersMenu (boxstyle%, tr%, lc%, fc%, bc%)
CLS
PRINT STRING$(2080, 219)
NumbersMenu 5, 5, 40, 1, 14
'           ³  ³   ³  ³  ÀÄÄÄ¿
' boxstyle%ÄÙ tr% lc% ÀÄfc%  bc%

'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Boxstyle:
' There are five choices of boxstyles (Press F 3 on the Tools Menu
' to see what they look like.)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Tr%:
' Location of row for first line of box. (Placing longer menus below
' rows 12 to 16 will cause them not to properly appear on the screen.)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Lc%:
' Location of first column for first line of box. (Menus are 25 columns
' wide, placing them near the edge of the screen at column 55 or greater
' will cause distortion.)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Fc%:
' Foreground color (Pick any color from 1 to 15)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Bc%:
' Background color (Pick any color from 1 to 15)

SUB NumbersMenu (boxstyle%, tr%, lc%, fc%, bc%)
DIM menu$(0 TO 11)
COLOR fc%, bc%
SELECT CASE boxstyle%
CASE 1
side$ = "³"
LOCATE tr%, lc%: PRINT "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
LOCATE tr% + 11, lc%: PRINT "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
CASE 2
side$ = "º"
LOCATE tr%, lc%: PRINT "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
LOCATE tr% + 11, lc%: PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼"
CASE 3
side$ = "º"
LOCATE tr%, lc%: PRINT "ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·"
LOCATE tr% + 11, lc%: PRINT "ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ½"
CASE 4
side$ = "³"
LOCATE tr%, lc%: PRINT "ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¸"
LOCATE tr% + 11, lc%: PRINT "ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¾"
CASE 5
side$ = "Û"
LOCATE tr%, lc%: PRINT STRING$(25, 219)
LOCATE tr% + 11, lc%: PRINT STRING$(25, 219)
END SELECT
FOR set = 1 TO 10
LOCATE set + tr%, lc%: PRINT side$; SPACE$(23); side$
NEXT
menu$(1) = side$ + "   1   QUICKBASIC      " + side$  'spacing for menu items
menu$(2) = side$ + "   2   POWERBASIC      " + side$
menu$(3) = side$ + "   3   VISUAL BASIC    " + side$
menu$(4) = side$ + "   4   TRUE BASIC      " + side$
menu$(5) = side$ + "   5   GW BASIC        " + side$
menu$(6) = side$ + "   6   Z BASIC         " + side$
menu$(7) = side$ + "   7   VB FOR DOS      " + side$
menu$(8) = side$ + "   8   GFA BASIC       " + side$
menu$(9) = side$ + "   9   LIBERTY BASIC   " + side$
menu$(10) = side$ + "   0   EXIT PROGRAM    " + side$
FOR set = 0 TO 11
LOCATE set + tr%, lc%: COLOR fc%, bc%: PRINT menu$(set)
NEXT
DO
DO
key$ = INKEY$
LOOP WHILE key$ = ""
keymove = ASC(RIGHT$(key$, 1))' intrprets scancodes from key press
SELECT CASE keymove  ' edit out END in the cases and place in your own code
CASE 49: END   ' ASCII code for 1
CASE 50: END   '   "    "    "  2
CASE 51: END   '   "    "    "  3
CASE 52: END   '     etc.
CASE 53: END
CASE 54: END
CASE 55: END
CASE 56: END
CASE 57: END
CASE 48: END    ' this line might seem to be out of place but 48 is the ASCII
END SELECT      ' code for 0, which is being used as an exit from the menu
LOOP
END SUB

