DECLARE SUB FkeyMenu (boxstyle%, fc%, bc%, tr%, lc%)
CLS
PRINT STRING$(2080, 219)
FkeyMenu 2, 15, 4, 5, 44
'        ³  ³   ³  ³   ÀÄÄÄ¿
'        ³  À¿  À¿ ÀÄ¿     ³
' boxstyle%  fc% bc% ÀÄtr% lc%
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Boxstyle:
' There are five choices of boxstyles (Press F 3 on the Tools Menu
' to see what they look like.)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Fc%:
' Foreground color (Pick any color from 1 to 15)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' Bc%:
' Background color (Pick any color from 1 to 15)
'          ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' 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 66 or greater
' will cause distortion.)

SUB FkeyMenu (boxstyle%, fc%, bc%, tr%, lc%)
DIM menu$(0 TO 11)
COLOR fc%, bc%
SELECT CASE boxstyle%
CASE 1                                ' elements for box building
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
menu$(1) = side$ + "  F 1  = ITEM 1        " + side$  ' sets up spacing
menu$(2) = side$ + "  F 2  = ITEM 2        " + side$  ' for menu entries
menu$(3) = side$ + "  F 3  = ITEM 3        " + side$
menu$(4) = side$ + "  F 4  = ITEM 4        " + side$
menu$(5) = side$ + "  F 5  = ITEM 5        " + side$
menu$(6) = side$ + "  F 6  = ITEM 6        " + side$
menu$(7) = side$ + "  F 7  = ITEM 7        " + side$
menu$(8) = side$ + "  F 8  = ITEM 8        " + side$
menu$(9) = side$ + "  F 9  = ITEM 9        " + side$
menu$(10) = side$ + "  F 10 = EXIT PROGRAM  " + side$
FOR set = 0 TO 11
LOCATE set + tr%, lc%: COLOR fc%, bc%: PRINT menu$(set)
NEXT
DO
DO
keys$ = INKEY$
LOOP WHILE keys$ = ""
keymove = ASC(RIGHT$(keys$, 1)) ' Determines which scancode to use; also
                               ' locks out all other key presses that
                               ' aren't in the case statments

SELECT CASE keymove   ' Edit out END and place your own code in the cases
CASE 59: END ' Scancode for F1 key
CASE 60: END ' Scancode for F2 key
CASE 61: END ' Scancode for F3 key
CASE 62: END ' Scancode for F4 key
CASE 63: END ' Scancode for F5 key
CASE 64: END ' Scancode for F6 key
CASE 65: END ' Scancode for F7 key
CASE 66: END ' Scancode for F8 key
CASE 67: END ' Scancode for F9 key
CASE 68: END ' Scancode for F10 key
END SELECT
LOOP
END
END SUB

