home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1988 / 10_11 / tricks / mousesub.bas < prev    next >
Encoding:
BASIC Source File  |  1988-06-23  |  1.6 KB  |  83 lines

  1. '* ------------------------------------------------------- *
  2. '*                  MOUSESUB.BAS                           *
  3. '*        Routinen für Microsoft-kompatible Mäuse          *
  4. '* ------------------------------------------------------- *
  5. '*   (c) 1988 by HEIMSOETH Software /Technical Support     *
  6. '*          veröffentlicht in TOOLBOX 10/11'88               *
  7. '* ------------------------------------------------------- *
  8. '*            Compiler: Turbo Basic  V1.01e                *
  9. '* ------------------------------------------------------- *
  10. %TRUE  = -1
  11. %FALSE = 0
  12.  
  13. SUB InitMouse
  14.   REG 1,0
  15.   CALL INTERRRUPT 51
  16. END SUB
  17.  
  18. SUB ShowCursor
  19.   REG 1,1
  20.   CALL INTERRUPT 51
  21. END SUB
  22.  
  23. SUB HideCursor
  24.   REG 1,2
  25.   CALL INTERRUPT 51
  26. END SUB
  27.  
  28. DEF FN XPosition
  29.   REG 1,3
  30.   CALL INTERRUPT 51
  31.   FN XPosition = REG(3)
  32. END DEF
  33.  
  34. DEF FN YPosition
  35.   REG 1,3
  36.   CALL INTERRUPT 51
  37.   FN YPosition = REG(4)
  38. END DEF
  39.  
  40. DEF FN LeftButton
  41.   REG 1,3
  42.   CALL INTERRUPT 51
  43.   IF ((REG(2) AND 1) = 1) THEN
  44.     FN LeftButton = %TRUE
  45.   ELSE
  46.     FN LeftButton = %FALSE
  47.   END IF
  48. END DEF
  49.  
  50. DEF FN RightButton
  51.   REG 1,3
  52.   CALL INTERRUPT 51
  53.   IF ((REG(2) AND 2) = 2 THEN
  54.     FN RightButton = %TRUE
  55.   ELSE
  56.     FN RightButton = %FALSE
  57.   END IF
  58. END DEF
  59.  
  60. SUB SetXY(x%,y%)
  61.   REG 1,4
  62.   REG 3,x%
  63.   REG 4,y%
  64.   CALL INTERRUPT 51
  65. END SUB
  66.  
  67. SUB SetXRange(x1%,x2%)
  68.   REG 1,7
  69.   REG 2,0
  70.   REG 3,x1%
  71.   REG 4,x2%
  72.   CALL INTERRUPT 51
  73. END SUB
  74.  
  75. SUB SetYRange(y1%,y2%)
  76.   REG 1,8
  77.   REG 2,0
  78.   REG 3,y1%
  79.   REG 4,y2%
  80.   CALL INTERRUPT 51
  81. END SUB
  82. '* ------------------------------------------------------- *
  83. '*               Ende von MOUSESUB.BAS                     *