Microsoft KB Archive/106698

From BetaArchive Wiki

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

ID: Q106698



The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 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 query words: FoxDos ACTIVE mouse.com mouse.sys

Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: August 23, 1999
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.