Microsoft KB Archive/267920

= BUG: ListBox Click Event Does Not Fire if Item Selected in Code =

Article ID: 267920

Article Last Modified on 10/15/2002

-

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.



Steps to Reproduce Behavior
 Create a new Windows CE project in eMbedded Visual Basic. Form1 is created by default. Add a ListBox control (List1) and a CommandButton control (Command1) to Form1.  Paste the following code into Form1: Private Sub Command1_Click List1.ListIndex = 3 End Sub

Private Sub Form_Load List1.AddItem &quot;1&quot; List1.AddItem &quot;2&quot; List1.AddItem &quot;3&quot; List1.AddItem &quot;4&quot; List1.AddItem &quot;5&quot; List1.AddItem &quot;6&quot; End Sub

Private Sub List1_Click MsgBox &quot;List1_Click&quot; End Sub  Run the application. Click Command1 and note that the Click event of List1 does not fire.

Additional query words: evb vbce wce

Keywords: kbbug kbpending KB267920

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.