Microsoft KB Archive/253335

= BUG: CE CommonDialog: ShowOpen Displays Only My Document Files =

Article ID: 253335

Article Last Modified on 8/19/2005

-

APPLIES TO

 Microsoft Windows CE Toolkit for Visual Basic 6.0, when used with:  Microsoft Windows CE 2.11 for the Handheld PC  Microsoft eMbedded Visual Basic 3.0, when used with:  Microsoft Windows CE 2.11 for the Handheld PC

 Microsoft Windows CE Platform Software Development Kit for Handheld PC 2000

 Microsoft Windows CE Platform Software Development Kit for Handheld PC 2000</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q253335

<div class="symptoms_section">

SYMPTOMS
The Open common dialog box displays files from the My Documents folder and its sub-folders regardless of how the FileName or InitDir properties of the CommonDialog control are set.

<div class="resolution_section">

RESOLUTION
To display the contents of a particular folder, use the FileSystem object.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

MORE INFORMATION
The Windows CE operating system on the devices listed above ignores the FileName property and only respects the InitDir property if it is one of the "special" folders like Templates, Business, or Personal.

Steps to Reproduce the Problem
<ol> Create a new Windows CE Project in Visual Basic. Form1 is created by default.</li> From the Project menu, choose Components, and then add the Microsoft CE CommonDialog Control 6.0 to the project.</li> Add a CommonDialog control to Form1.</li>  Paste the following code into the General Declarations section of Form1: Private Sub Form_Activate CommonDialog1.FileName = "\My Documents\Templates\To Do.pwi" CommonDialog1.Filter = "All Files|*.*" CommonDialog1.ShowOpen End Sub </li> Run the application, targeting the remote device. The result is that the Open dialog box displays all files from the My Documents folder and its sub-folders. The expected behavior is for the Open dialog box to display files in the Templates directory.</li></ol>

Additional query words: wce vbce vbce6 eVB

Keywords: kbbug kbtoolkit kbpending KB253335

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.