need help with getting cursors to work!!!!!!!!!!!!!!!!! 
Author Message
 need help with getting cursors to work!!!!!!!!!!!!!!!!!

Help! I am wondering how I can get the cursor keys to respond to
inputs. I've looked over the help files and tryed a user defined keys,
but nothing works!                    %-}               8-|        :-#



Wed, 14 Jul 1999 03:00:00 GMT  
 need help with getting cursors to work!!!!!!!!!!!!!!!!!

Quote:

> Help! I am wondering how I can get the cursor keys to respond to
> inputs. I've looked over the help files and tryed a user defined keys,
> but nothing works!                    %-}               8-|        :-#

--
Forecast   : After rainfall in September, Christmas will be in December

Regards,
Egbert Zijlema
Fax: +31 50 5844308

[ WATCHDOG.BAS 1K ]
DECLARE FUNCTION WatchDog% ()

' WATCHDOG.BAS  - routine to detect cursor keys
' Author:         Egbert Zijlema
' (up)Date:       25 January 1997
' Tool:           Power Basic 3.2
' Modified:       made QBasic compatible
' Status:         Public Domain

CLS

' main menu (in your program it's better to make this a SUB!)
COLOR 7, 0
LOCATE 25, 1: PRINT "You pressed: ";
DO
  KeyPressed% = WatchDog%
  SELECT CASE KeyPressed%
    CASE 00008: cursor$ = "Back  "
    CASE 18176: cursor$ = "Home  "
    CASE 18432: cursor$ = "Up    "
    CASE 18688: cursor$ = "PgUp  "
    CASE 19200: cursor$ = "Left  "
    CASE 19712: cursor$ = "Right "
    CASE 20224: cursor$ = "End   "
    CASE 20480: cursor$ = "Down  "
    CASE 20736: cursor$ = "PgDn  "
    CASE 20992: cursor$ = "Insert"
    CASE 21248: cursor$ = "Del   "
    CASE ELSE: cursor$ = "      "
  END SELECT
  COLOR 15
  LOCATE 25, 14: PRINT cursor$;
LOOP UNTIL KeyPressed% = 27           ' Escape key to quit
CLS
END

FUNCTION WatchDog%
  DO
    KeyToTrace$ = INKEY$
  LOOP UNTIL LEN(KeyToTrace$)
  WatchDog% = CVI(KeyToTrace$ + CHR$(0))
END FUNCTION



Wed, 14 Jul 1999 03:00:00 GMT  
 need help with getting cursors to work!!!!!!!!!!!!!!!!!

Quote:

> Help! I am wondering how I can get the cursor keys to respond to
> inputs. I've looked over the help files and tryed a user defined keys,
> but nothing works!                    %-}               8-|        :-#

I use the cursor keys via INKEY$. For example you get this results:
a$=inkey$
if a$=chr$(0)+chr$(75) - Cursor left
if a$=chr$(0)+chr$(77) - Cursor right
          ...+chr$(80) - Cursor down
          ...+chr$(72) - Cursor up

This little program may help:

Start:
a$ = INKEY$
IF a$ <> "" THEN
  CLS
  FOR i = 1 TO LEN(a$)
    PRINT ASC(MID$(a$, i, 1)
  NEXT i
END IF
IF a$ <> "e" THEN GOTO Start



Thu, 15 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Getting ADO Sort property to work with Server Side Cursors

2. help needed getting Excel data into TSV Actual Work

3. Help needed getting the ChooseFont api function to work

4. Please help me getting help to work

5. Help needed on getting help

6. Need help: cursor position

7. Need help on VB5 add-in for current cursor position

8. Need help with Insert/Overstrike Cursor

9. Help Needed: Timer and the hourglass cursor

10. Need help positioning mouse cursor

11. Need help positioning mouse cursor

12. Need help positioning mouse cursor

 

 
Powered by phpBB® Forum Software