Results 1 to 3 of 3

Thread: File Filter Dilemma - *Resolved*

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2002
    Posts
    63

    Question File Filter Dilemma - *Resolved*

    Hey guys, I have a small problem. I want to show the Open DialogBox, but have the default file filter be set to "All Image Files", and have it showing files of the type bmp, jpg, jpeg, and gif.

    I have the following code, but it doesn't work. It displays the correct text ("All Image Files (*.bmp), (*.jpg), (*.jpeg), (*.gif)" in the drop-down on the dialogbox, however, creates several blank text entry's below it, each which are one of the filters.

    How can I have it so that the default filter is All Image Files, and show the types of files listed above?

    VB Code:
    1. Dim sFileFilter As String
    2. sFileFilter = "All Image Files (*.bmp), (*.jpg), (*.jpeg), (*.gif)|*.bmp| |*.jpg| |*.jpeg| |*.gif|"
    3. With CommonDialog2
    4.     .Filter = sFileFilter
    5.     ' Some other flags and such are here
    6.     .ShowOpen
    7.     ' Some other code related to my program is here
    8. End With
    Last edited by NeedHelpPlz; Dec 7th, 2002 at 09:55 PM.

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