The Mouse

 BBS: Inland Empire Archive
Date: 11-26-92 (17:33)             Number: 381
From: GERALD JORDAN                Refer#: NONE
  To: BRAD BARTLETT                 Recvd: NO  
Subj: The Mouse                      Conf: (2) Quik_Bas
'BB> I posted a message earlier about how to use the mouse in QuickBasic
'Try this;
SUB mouse (a, b, c, d)
SHARED reg AS RegType
reg.ax = a
reg.bx = b
reg.cx = c
reg.dx = d
CALL Interrupt(&H33, reg, reg)
a = reg.ax
b = reg.bx
c = reg.cx
d = reg.dx
END SUB

SUB CursorLocate (X, Y, Button)
a = 3
b = 0
c = 0
d = 0
mouse a, b, c, d
Button = b
X = c / 8 + 1     'X coordinate of cursor
Y = d / 8 + 1     'Y coordinate of cursor
END SUB

DO
  CursorLocate X,Y,Button
LOOP UNTIL Button
SELECT CASE X
  IF X = 'wherever  THEN
  SELECT CASE Y
   CASE 3
    'DO SOMETHING
   CASE 10
    'DO SOMETHING
   END SELECT
   END IF
END SELECT

'Hope this will get you going.May be some error but should be OK.

 * SLMR 2.1a * FOR A = 1 TO INFINITY PRINT "HELP" NEXT HELPHELPHELPHELPH
---
 * Origin: V. P. BBS|(904)362-4559|V32bis|Tradewars 2002 (1:3600/11)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET