CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2012

    VB6 CommonDialog - Open File problem

    Am confused...

    When I execute the following code ...
    Why do I see files in c:\Users\lee\documents folder when PIX filter selected?
    Why do I see files in all sorts of folders when PDFS filter selected?
    My .initDir property specifies root folder to search.

    Private Sub Command1_Click()
        CommonDialog1.InitDir = "c:\trims2k"
        CommonDialog1.Filter = "PDFS|*.pdf|Pix|*.jpg"
        CommonDialog1.FilterIndex = 2
        CommonDialog1.Flags = cdlOFNNoChangeDir
        Text1.Text = CommonDialog1.FileName
    End Sub
    Files displayed when i click down arrow on file list are shown below..
    Any help is appreciated.

    Attached Images Attached Images   

  2. #2
    Join Date
    Jul 2001
    Sunny South Africa

    Re: VB6 CommonDialog - Open File problem

    I suppose you've already found an answer.. But for the benefit of the forum users I'll post a link here explaining how to achieve this:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width