Microsoft KB Archive/248070
Article ID: 248070
Article Last Modified on 10/2/2003
- Microsoft Windows CE Toolkit for Visual Basic 6.0
This article was previously published under Q248070
When selecting an item from a combo box, the Click event for a command button may fire. This happens on command buttons having shortcut keys and is related to the relative TabIndex values between the command button and the combo box.
To prevent the problem remove the shortcut keys from the command buttons. Modifying the TabIndex property of the combo box and ensuring that it does not have the highest TabIndex value on the form works in some cases without removing the shortcut keys.
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 either Visual Basic or eMbedded Visual Basic. Form1 is created by default.
- Add a ComboBox to Form1.
- Add a Command Button to Form1. Set its Caption to "&Save".
Paste the following code into Form1:
Private Sub Command1_Click() MsgBox "In Command1_Click" End Sub Private Sub Form_Load() Combo1.AddItem "Test" End Sub
- Run the application.
- Drop-down the combo box and click Test. The Click event for the command button will fire.
Additional query words: wce vbce vbce6 evb
Keywords: kbbug kbtoolkit kbpending KB248070