How to Bypass MOUSE.LIB in QuickBASIC Version 4.00

ID: Q31429


The information in this article applies to:
  • Microsoft Mouse driver for MS-DOS, versions 6.x, 7.x, 8.x, 9.0
  • Microsoft QuickBASIC, versions 1.x, 2.x, 3.x, 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."

Additional query words: 9.00 BASIC

Keywords :
Version : MS-DOS:6.x,7.x,8.x,9.0; :1.x,2.x,3.x,4.0
Platform : MS-DOS
Issue type :


Last Reviewed: December 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.