BUG: Click Event May Fire Even Though Command Button Is Hidden (263660)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0, when used with:
    • Microsoft Windows CE Platform SDK for Pocket PC

This article was previously published under Q263660

SYMPTOMS

In Windows CE for the PocketPC project, the Click event of a command button still fires even though it is invisible. This behavior does not occur in Microsoft Visual Basic 6.0.

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 for the PocketPC project in eMbedded Visual Basic. Form1 is created by default.
  2. Add a command button and a list box to Form1.
  3. Paste the following code to Form1:
    Private Sub Command1_Click()
        List1.AddItem "Addition"
    End Sub
    
    Private Sub Form_Load()
        Command1.Visible = False
        Command1.Default = True
    End Sub
    
    Private Sub Form_OKClick()
        App.End
    End Sub
    					
  4. Press the F5 key to run the project, and then press ENTER. Notice that "Addition" is added to the ListBox control.

Modification Type:MajorLast Reviewed:10/29/2003
Keywords:kbBug kbpending KB263660