Microsoft KB Archive/113686

= FIX: Lost MouseDown Event with Command Button & Check Box =

Article ID: 113686

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition

-



This article was previously published under Q113686



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
 Start a new project in Visual Basic. Form1 is created by default. Add a Command button (Command1) to Form1.  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   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  From the Run menu, choose Start (ALT, R, S) or press the F5 key to run the program. Click the Command1 button repeatedly. The debug window will show that fewer MouseDown events are generated than MouseUp events.</li></ol>

Additional query words: buglist2.00 buglist3.00 2.00 3.00 fixlist4.00

Keywords: kbbug kbfix KB113686

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.