FIX: Lost MouseDown Event with Command Button & Check Box

Last reviewed: October 30, 1997
Article ID: Q113686
3.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0

SYMPTOMS

If a user repeatedly clicks a command button or check box, the control does not receive all the MouseDown events, but it does receive all the MouseUp events.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.

MORE INFORMATION

The following steps demonstrate that a MouseDown event is lost after repeatedly clicking a command button.

Steps to Reproduce Problem

  1. Start a new project in Visual Basic. Form1 is created by default.

  2. Add a Command button (Command1) to Form1.

  3. Add the following code to the Command1_MouseDown event procedure of Form1:

       Sub Command1_MouseDown ()
          Static i
          i = i + 1
          Debug.Print "MouseDown - "; i
       End Sub
    
    

  4. Add the following code to the Command1_MouseUp event procedure of Form1:

       Sub Command1_MouseUp ()
          Static j
          j = j + 1
          Debug.Print "MouseUp - "; j
       End Sub
    
    

  5. From the Run menu, choose Start (ALT, R, S) or press the F5 key to run the program.

  6. Click the Command1 button repeatedly. The debug window will show that fewer MouseDown events are generated than MouseUp events.


Additional reference words: buglist2.00 buglist3.00 2.00 3.00 fixlist4.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsStd
Keywords : PrgCtrlsStd kbbuglist kbprg
Version : 3.00
Platform : WINDOWS
Solution Type : kbfix


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: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.