Results 1 to 3 of 3

Thread: add more item in filter (common dialog box)

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2001
    Posts
    57

    add more item in filter (common dialog box)

    I can only enter one item in the Filter property of a common dialog box. How can I add more so that the box show more types of files? such as:

  2. #2
    Lively Member
    Join Date
    May 2001
    Location
    Falkenberg, Sweden
    Posts
    76
    You add more filters just by typing them after each other.
    Code:
    comdialog.Filter = "Text (*.txt)|*.txt|Pictures (*.bmp;*.ico)|*.bmp;*.ico"
    ________________________
    Fredrik Klarqvist

  3. #3
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    fredrik, that method will allow them to open any of those files when only that one is clicked. Try this:

    CommonDialog1.Filter = "Bitmap (*.bmp)|*.bmp|GIF (*.gif)|*.gif|JPEG (*.jpg, *.jpeg)|*.jpg;*.jpeg"

    etc.

    You can seperate them with the pipe "|" character.
    <removed by admin>

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