Mouse programing

 BBS: Inland Empire Archive
Date: 10-21-92 (17:12)             Number: 295
From: SCOTT DRYSDALE               Refer#: NONE
  To: KEVIN POOLE                   Recvd: NO  
Subj: Mouse programing               Conf: (2) Quik_Bas
  Your kinda lucky you caught me.. Try this:

DECLARE SUB mousecall (m0%, m1%, m2%, m3%)
TYPE Register              'for CALL INTERRUPT
     ax    AS INTEGER
     bx    AS INTEGER
     cx    AS INTEGER
     dx    AS INTEGER
     bp    AS INTEGER
     si    AS INTEGER
     di    AS INTEGER
     flags AS INTEGER
DECLARE SUB Interrupt (intnum AS INTEGER, inreg AS
Register, outreg AS Register)

SUB mousecall (m0, m1, m2, m3) STATIC

   DIM regs AS Register = m0
   regs.bx = m1 = m2
   regs.dx = m3

   Interrupt 51, regs, regs

   m0 =
   m1 = regs.bx
   m2 =
   m3 = regs.dx


SUB mouseconfine
   Border = 1
   m1 = 7                'X
   m3 = 0                'minimum
   m4 = 309              'maximum
   mousecall m1, m2, m3, m4
   m1 = 8                'Y
   m3 = 0                'minimum
   m4 = 189              'maximum
   mousecall m1, m2, m3, m4
m1 = 3: 'Set into calling location
mousecall m1,m2,m3,m4
' X and Y pixel location's are now stored in m3, and m4.

--- Maximus 2.01wb
 * Origin: The BULLpen BBS * Intel 14.4EX (613)549-5168 (1:249/140)
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