home *** CD-ROM | disk | FTP | other *** search
-
- ' Subprogram to get a keypress and compare it against
- ' a string passed in MKey$, looping until there is a match.
-
- SUB MenuKey(MRow%,MCol%,MKey$) STATIC
-
- LOCATE MRow%,MCol%,1 ' turn on cursor
- MK$ = ""
- DO WHILE MK$ = "" ' get keypress
- MK$ = INKEY$
- IF INSTR(MKey$,MK$) < 1 THEN ' check for match
- MK$ = "" ' reset variable
- SOUND 1000,1:SOUND 1500,2:SOUND 500,1 ' alarm if no match
- END IF
- LOOP
- LOCATE ,,0 ' turn off cursor
- MKey$ = MK$
-
- END SUB
-