BUG: ListBox Click Event Does Not Fire if Item Selected in Code (267920)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q267920

SYMPTOMS

When you select a ListBox control item through code with eMbedded Visual Basic (eVB), the Click event does not fire.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE project in eMbedded Visual Basic. Form1 is created by default.
  2. Add a ListBox control (List1) and a CommandButton control (Command1) to Form1.
  3. Paste the following code into Form1:
    Private Sub Command1_Click()
       List1.ListIndex = 3
    End Sub
    
    Private Sub Form_Load()
       List1.AddItem "1"
       List1.AddItem "2"
       List1.AddItem "3"
       List1.AddItem "4"
       List1.AddItem "5"
       List1.AddItem "6"
    End Sub
    
    Private Sub List1_Click()
       MsgBox "List1_Click"
    End Sub
    					
  4. Run the application.
  5. Click Command1 and note that the Click event of List1 does not fire.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbDSupport KB267920