Microsoft KB Archive/180833

{|
 * width="100%"|

FIX: An Empty ListBox Generates a DoubleClick Event

 * }

Q180833

-

The information in this article applies to:


 * Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0

-

SYMPTOMS
Double-clicking on an empty ListBox fires the DoubleClick event. The DoubleClick event is not supposed to fire when the ListBox is empty.

RESOLUTION
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

STATUS
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