1: DECLARE SUB FkeyMenu (boxstyle%, fc%, bc%, tr%, lc%) 2: CLS 3: PRINT STRING$(2080, 219) 4: FkeyMenu 2, 15, 4, 5, 44 5: ' ³ ³ ³ ³ ÀÄÄÄ¿ 6: ' ³ À¿ À¿ ÀÄ¿ ³ 7: ' boxstyle% fc% bc% ÀÄtr% lc% 8: ' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 9: ' Boxstyle: 10: ' There are five choices of boxstyles (Press F 3 on the Tools Menu 11: ' to see what they look like.) 12: ' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 13: ' Fc%: 14: ' Foreground color (Pick any color from 1 to 15) 15: ' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 16: ' Bc%: 17: ' Background color (Pick any color from 1 to 15) 18: ' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 19: ' Tr%: 20: ' Location of row for first line of box. (Placing longer menus below 21: ' rows 12 to 16 will cause them not to properly appear on the screen.) 22: ' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 23: ' Lc%: 24: ' Location of first column for first line of box. (Menus are 25 columns 25: ' wide, placing them near the edge of the screen at column 66 or greater 26: ' will cause distortion.) 27: 28: SUB FkeyMenu (boxstyle%, fc%, bc%, tr%, lc%) 29: DIM menu$(0 TO 11) 30: COLOR fc%, bc% 31: SELECT CASE boxstyle% 32: CASE 1 ' elements for box building 33: side$ = "³" 34: LOCATE tr%, lc%: PRINT "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿" 35: LOCATE tr% + 11, lc%: PRINT "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ" 36: CASE 2 37: side$ = "º" 38: LOCATE tr%, lc%: PRINT "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»" 39: LOCATE tr% + 11, lc%: PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ" 40: CASE 3 41: side$ = "º" 42: LOCATE tr%, lc%: PRINT "ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·" 43: LOCATE tr% + 11, lc%: PRINT "ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ" 44: CASE 4 45: side$ = "³" 46: LOCATE tr%, lc%: PRINT "ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸" 47: LOCATE tr% + 11, lc%: PRINT "ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;" 48: CASE 5 49: side$ = "Û" 50: LOCATE tr%, lc%: PRINT STRING$(25, 219) 51: LOCATE tr% + 11, lc%: PRINT STRING$(25, 219) 52: END SELECT 53: menu$(1) = side$ + " F 1 = ITEM 1 " + side$ ' sets up spacing 54: menu$(2) = side$ + " F 2 = ITEM 2 " + side$ ' for menu entries 55: menu$(3) = side$ + " F 3 = ITEM 3 " + side$ 56: menu$(4) = side$ + " F 4 = ITEM 4 " + side$ 57: menu$(5) = side$ + " F 5 = ITEM 5 " + side$ 58: menu$(6) = side$ + " F 6 = ITEM 6 " + side$ 59: menu$(7) = side$ + " F 7 = ITEM 7 " + side$ 60: menu$(8) = side$ + " F 8 = ITEM 8 " + side$ 61: menu$(9) = side$ + " F 9 = ITEM 9 " + side$ 62: menu$(10) = side$ + " F 10 = EXIT PROGRAM " + side$ 63: FOR set = 0 TO 11 64: LOCATE set + tr%, lc%: COLOR fc%, bc%: PRINT menu$(set) 65: NEXT 66: DO 67: DO 68: keys$ = INKEY$ 69: LOOP WHILE keys$ = "" 70: keymove = ASC(RIGHT$(keys$, 1)) ' Determines which scancode to use; also 71: ' locks out all other key presses that 72: ' aren't in the case statments 73: 74: SELECT CASE keymove ' Edit out END and place your own code in the cases 75: CASE 59: END ' Scancode for F1 key 76: CASE 60: END ' Scancode for F2 key 77: CASE 61: END ' Scancode for F3 key 78: CASE 62: END ' Scancode for F4 key 79: CASE 63: END ' Scancode for F5 key 80: CASE 64: END ' Scancode for F6 key 81: CASE 65: END ' Scancode for F7 key 82: CASE 66: END ' Scancode for F8 key 83: CASE 67: END ' Scancode for F9 key 84: CASE 68: END ' Scancode for F10 key 85: END SELECT 86: LOOP 87: END 88: END SUB 89: |