FIX: An Empty ListBox Generates a DoubleClick Event |
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 that are 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 kbOSWinCEsearch kbOSWinCE100 kbGrpDSVB
Issue type : kbbug
Technology : kbVBSearch kbAudDeveloper kbWinCETKVBSearch kbWinCESearch kbWinCETK100VB500
|
Last Reviewed: February 28, 1999 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |