Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you use function keys in QB?
#1
How do you use function keys, to use with the if command?
-yah
Reply
#2
Code:
CLS
DIM keyIn AS STRING
DO
        DO
                keyIn = INKEY$
        LOOP UNTIL LEN(keyIn) > 0
        LOCATE 1
        PRINT "                             "
        LOCATE 1
        IF LEN(keyIn) > 0 THEN
                PRINT "chr$("; ASC(LEFT$(keyIn, 1)); ") ";
                IF LEN(keyIn) > 1 THEN
                        PRINT "+ chr$("; ASC(RIGHT$(keyIn, 1)); ")"
                ELSE
                        PRINT
                END IF
        END IF
LOOP UNTIL keyIn = CHR$(27)

run that, hit the key you want to know the code for, then do like 'var = inkey$' 'if var = <whatever code> then'

*adds another reason fb is better ^^*
Reply
#3
Sw3333t thanks.
-yah
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)