FIX: Lost MouseDown Event with Command Button & Check Box (113686)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0

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

  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.

Modification Type:MajorLast Reviewed:12/9/2003
Keywords:kbbug kbfix KB113686