Article ID: 178753
Article Last Modified on 10/28/2003
Option Explicit
Public bToggle As Boolean 'Boolean Flag
Private Sub Form_Load()
'Adds items to the ListView control
ListView1.View = lvwList
ListView1.ListItems.Add , , "Test1"
ListView1.ListItems.Add , , "Test2"
ListView1.ListItems.Add , , "Test3"
ListView1.ListItems.Add , , "Test4"
ListView1.ListItems.Add , , "Test5"
ListView1.ListItems.Add , , "Test6"
ListView1.ListItems.Add , , "Test7"
End Sub
Private Sub ListView1_ItemClick(ByVal Item As ComctlLib.ListItem)
'This event only occurs if the Boolean flag is True.
If bToggle = True Then
'Comment all lines in this event except for the following
'line to reproduce the bug.
MsgBox ListView1.SelectedItem.Text
End If
bToggle = False
End Sub
Private Sub ListView1_MouseDown(Button As Integer, _
Shift As Integer, _
x As Single, _
y As Single)
'Set the Boolean flag to True. Comment the following line
'to reproduce the bug.
bToggle = True
End Sub
Additional query words: kbVBp500bug kbVBp600fix kbVBp kbdsd kbDSupport kbControl
Keywords: kbbug kbfix KB178753