Microsoft KB Archive/253335: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 79: Line 79:
== MORE INFORMATION ==
== 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.
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 ===
=== Steps to Reproduce the Problem ===


Line 88: Line 88:
<li><p>Paste the following code into the General Declarations section of Form1:</p>
<li><p>Paste the following code into the General Declarations section of Form1:</p>
<pre class="codesample">Private Sub Form_Activate()
<pre class="codesample">Private Sub Form_Activate()
     CommonDialog1.FileName = &quot;\My Documents\Templates\To Do.pwi&quot;
     CommonDialog1.FileName = "\My Documents\Templates\To Do.pwi"
     CommonDialog1.Filter = &quot;All Files|*.*&quot;
     CommonDialog1.Filter = "All Files|*.*"
     CommonDialog1.ShowOpen
     CommonDialog1.ShowOpen
End Sub
End Sub

Latest revision as of 13:52, 21 July 2020

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



This article was previously published under Q253335

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.

RESOLUTION

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

STATUS

This behavior is by design.

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

  1. Create a new Windows CE Project in Visual Basic. Form1 is created by default.
  2. From the Project menu, choose Components, and then add the Microsoft CE CommonDialog Control 6.0 to the project.
  3. Add a CommonDialog control to Form1.
  4. 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
                        
  5. 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.



Additional query words: wce vbce vbce6 eVB

Keywords: kbbug kbtoolkit kbpending KB253335