Microsoft KB Archive/248070

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 12:51, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article ID: 248070

Article Last Modified on 10/2/2003



APPLIES TO

  • Microsoft Windows CE Toolkit for Visual Basic 6.0



This article was previously published under Q248070

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 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 either Visual Basic or eMbedded 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:

       Private Sub Command1_Click()
           MsgBox "In Command1_Click"
       End Sub
    
       Private Sub Form_Load()
           Combo1.AddItem "Test"
       End Sub
                        
  5. Run the application.
  6. 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