How to Determine If an MS-DOS Mouse Driver Is Installed

Last reviewed: April 18, 1995
Article ID: Q106698
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

To determine if a user has an MS-DOS mouse driver installed, you can use the MROW() function.

The MROW() function returns a number that indicates the current row location of the mouse cursor (pointer). If MROW() returns -1, there are two possibilities. First, no mouse driver has been installed, and there is no output window. Second, the mouse cursor is positioned above or below the user-defined window.

To get an accurate reading from MROW(), test the presence of the mouse prior to activating any user-defined window. For example:

   *** Begin Sample Code ***

   SET MOUSE ON
   RELEASE WINDOWS
   IF MROW()=-1
      WAIT WINDOW "No MOUSE driver installed"
   ELSE
      WAIT WINDOW "Mouse driver is installed"
   ENDIF

   *** End Sample Code ***

NOTE: The command SET MOUSE OFF also returns a -1.


Additional reference words: FoxDos 2.00 2.50 2.50a 2.50b ACTIVE mouse.com
mouse.sys
KBCategory: kbprg
KBSubcategory:


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: April 18, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.