BUG: VBCE: Clicking ComboBox May Trigger Command Click Event

ID: Q248070


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 6.0, version 1.0
  • Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0


SYMPTOMS

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.


RESOLUTION

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.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE project in Visual Basic. Form1 is created by default.


  2. Add a ComboBox to Form1.


  3. Add a Command Button to Form1. Set its Caption to "&Save".


  4. Paste the following code into Form1:


  5. 
       Private Sub Command1_Click()
           MsgBox "In Command1_Click"
       End Sub
    
       Private Sub Form_Load()
           Combo1.AddItem "Test"
       End Sub 
  6. Run the application.


  7. Drop-down the combo box and click Test. The Click event for the command button will fire.


Additional query words: wce vbce vbce6 kbDSupport

Keywords : kbToolkit kbVBp600bug kbWinCE kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.