FIX: An Empty ListBox Generates a DoubleClick EventID: Q180833
|
Double-clicking on an empty ListBox fires the DoubleClick event. The DoubleClick event is not supposed to fire when the ListBox is empty.
To work around the issue, add code to the DoubleClick event to detect an
empty ListBox, and then exit the procedure as follows:
Private Sub List1_DblClick()
If List1.ListCount = 0 Then Exit Sub
MsgBox "doubleclick" 'this line won't execute when empty.
End Sub
Microsoft has confirmed this to be a problem in the Microsoft products listed
at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
Additional query words: vbce5 vbce6vbce
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: February 25, 1999