DOCUMENT:Q113686 11-JAN-2001 [vbwin] TITLE :FIX: Lost MouseDown Event with Command Button & Check Box PRODUCT :Microsoft Visual Basic for Windows PROD/VER::2.0,3.0 OPER/SYS: KEYWORDS:kbbuglist ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Standard Edition for Windows, versions 2.0, 3.0 - Microsoft Visual Basic Professional Edition for Windows, versions 2.0, 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 query words: buglist2.00 buglist3.00 2.00 3.00 fixlist4.00 ====================================================================== Keywords : kbbuglist Technology : kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB300Search kbVB300 kbVB200 Version : :2.0,3.0 Issue type : kbbug 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. Copyright Microsoft Corporation 2001.