home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / homonlib.zip / SETCURS.BAS < prev    next >
BASIC Source File  |  1995-04-13  |  1KB  |  39 lines

  1. DEFINT A-Z
  2.  
  3. ' $INCLUDE: 'SETCURS.INC'
  4.  
  5. '(The function declaration is in the include file)
  6.  
  7. FUNCTION SetCursor (cursortype) STATIC
  8. '****************************************************************************
  9. 'A set/get function for turning the cursor on and off and changing its
  10. ' appearance.
  11. '
  12. 'Be sure to include the SETCURS.INC in the calling program and use its
  13. ' constants as arguments to the function.
  14. '
  15. 'To inquire on the current setting without changing it, pass a negative
  16. ' number as an argument (or anything besides one of the defined constants).
  17. '
  18. '****************************************************************************
  19.  
  20. STATIC cursor
  21. SetCursor = cursor                 'Retain previous value to return
  22.  
  23. SELECT CASE cursortype
  24.      CASE SCNONE                   'None - turn it off
  25.           LOCATE , , 0
  26.           cursor = cursortype
  27.      CASE SCINS                    'Insert - underscore cursor
  28.           LOCATE , , 1, 7
  29.           cursor = cursortype
  30.      CASE SCOVR                    'Overwrite - block cursor
  31.           LOCATE , , 1, 0, 7
  32.           cursor = cursortype
  33.      CASE ELSE
  34.           'Inquiry only
  35. END SELECT
  36.  
  37. END FUNCTION
  38.  
  39.