ID Number: Q77738
1.00
WINDOWS
buglist1.00
Summary:
When one mouse button is held down, double-clicking the other button
generates one more Click event than necessary.
Microsoft has confirmed this to be a problem in Visual Basic
programming system version 1.0 for Windows. We are researching this
problem and will post new information here as it becomes available.
More Information:
The following code demonstrates how an extra Click event is generated
when double-clicking one mouse button while holding down the other.
The problem does not occur when double-clicking either mouse button
individually.
Steps to Reproduce Problem
--------------------------
1. Start Visual Basic and choose New Project from the File menu
(ALT, F, N).
2. Double-click on the form or press F7 to bring up the code window.
3. Enter the following code in the Form_Click event procedure for
Form1:
Sub Form_Click ()
Print "Click"
End Sub
4. Enter the following code in the Form_DblClick event procedure:
Sub Form_DblClick ()
Print "DblClick"
End Sub
5. Enter the following code in the Form_MouseDown event procedure:
Sub Form_MouseDown ()
Print "Down"; Button
End Sub
6. Enter the following code in the Form_MouseUp event procedure:
Sub Form_MouseUp ()
Print "Up"; Button
End Sub
7. From the Run menu, choose Start.
8. Using the right mouse button, double-click anywhere on the form.
The output to Form1 should be as follows:
Down 2
Up 2
Click
DblClick
Up 2
9. Press and hold the left mouse button. The output to Form1 should be
as follows:
Down 1
10. While holding the left mouse button down, double-click with
the right mouse button and keep the left mouse button down.
The output to Form1 should be as follows:
Down 2
Up 2
Click
DblClick
Up 2
Click
The last Click was not generated when double-clicking with the right
mouse button alone (as illustrated in step 8 above). This additional
call to the Click event procedure is not expected behavior and is a
problem with Visual Basic. The problem also occurs when the right
mouse button is held down and you double-click the left mouse button.
Additional reference words: 1.00