How to Bypass MOUSE.LIB in QuickBASIC Version 4.00

Last reviewed: September 16, 1996
Article ID: Q31429
The information in this article applies to:
  • Microsoft Mouse Driver for MS-DOS, versions 6.x, 7.x, 8.x, and 9.0
  • Microsoft QuickBASIC, versions 1.x, 2.x, 3.x, and 4.0

SUMMARY

You can access the mouse driver by calling an interrupt in QuickBASIC rather than by creating a QuickBASIC library with the MOUSE.LIB. Follow the guidelines for programming in assembler language and call the interrupt 33 hexadecimal or 51 decimal.

The following is a QuickBASIC, version 4.00, example for showing the mouse cursor:

         ' declare type registers
   TYPE REGTYPE
   ax AS INTEGER
   bx AS INTEGER
   cx AS INTEGER
   dx AS INTEGER
   bp AS INTEGER
   si AS INTEGER
   di AS INTEGER
   ds AS INTEGER
   es AS INTEGER
   END TYPE

   DIM INREGS AS REGTYPE, OUTREGS AS REGTYPE
        ' initialize mouse
   INREGS.ax = 0
   CALL INTERRUPT(51, INREGS, OUTREGS)
        'show mouse cursor
   INREGS.ax = 1
   CALL INTERRUPT(51, INREGS, OUTREGS)

If you have the MOUSE.LIB utility, you can make a Quick library and call the mouse using the "CALL MOUSE(m1%,m2%,m3%,m4%)" command.

Mouse functions are described in the Microsoft Mouse "Programmer's Reference Guide."


KBCategory: kbhw
KBSubcategory:
Additional reference words: 9.00 BASIC


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.