BUG: CommandBar: "Memory Could Not Be Read" Error (208590)



The information in this article applies to:

  • Microsoft Windows CE Toolkit for Visual Basic 6.0

This article was previously published under Q208590

SYMPTOMS

If a ComboBox in a CommandBar has the focus while running a project in emulation, and the form is then closed via the CommandBar, an Application Error will result.

Note that this behavior occurs only in the emulator.

RESOLUTION

This error does not occur if another control is selected before the Close button of the CommandBar is clicked or if the Close button of the Form is clicked.

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. Start a new Windows CE HPC Project in Visual Basic. Form1 is created by default.
  2. When the Project Properties dialog appears, ensure that the Run on Target value is set to Handheld PC Emulation.
  3. Select Components from the Project menu, and select the Microsoft CE CommandBar Control 6.0.
  4. Add a CommandBar control to Form1.
  5. Paste the following code into the code module of Form1:
    Option Explicit
    
    Private Sub Form_Load()
        Dim C As CommandBarComboBox
        Set C = CommandBar1.Controls.Add(cbrComboBox, "MyCombo")
    End Sub
    						
  6. Run the project.
  7. Set the focus to the ComboBox by selecting it.
  8. Click the Close button on the CommandBar to close the form. Note that an Application Error in pvbload.exe results.
The problem happens if any ComboBox on the CommandBar has the focus when the Close button on the CommandBar is clicked: the ComboBox does not have to be empty.

Modification Type:MinorLast Reviewed:8/19/2005
Keywords:kbBug kbpending kbToolkit KB208590