BUG: MOUSE(0) Returns -1 After MouseUp on Modal Dialog (71242)






This article was previously published under Q71242

SYMPTOMS

After a modal dialog box handles a MouseUp event, the MOUSE(0) function may incorrectly return -1 as the status of the mouse button (incorrectly indicating the mouse button is still down). Expected behavior is for MOUSE(0) to return 1, indicating that the mouse button is not currently down and a single button-click occurred since the last call to MOUSE(0).

This problem occurs in Microsoft QuickBasic versions 1.00, 1.00a, and 1.00b for Macintosh Systems. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. The following code illustrates the problem; run the program and then click the mouse to pop up the first FILES$(1) dialog box:
   WHILE INKEY$ = ""
      m% = MOUSE(0)
      PRINT m%
      IF m% = -1 THEN
         x$ = FILES$(1) 'The dialog keeps reappearing after you click
                        'OK or CANCEL.
      END IF
   WEND
				

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: kbbug KB71242