Visual basic 6.0 - file filter on more than ONE file type

VB , Visual Basic , File Filter , Pattern , VB 6.0 , VB6 , Visual Basc 6.0 , file Melbourne, Australia
  • 10 years ago

    Hi all,

    I am trying to make a file/drive/folder directory interface with VB. It is all working except the only thing i can't

    manage to make it do is to filter on more than one file type. I want to be able to filter on BMP and TIF files, i have the following code:

    filterList.AddItem "*.TIF; *.BMP"

    filterList.SelText = filterList.List(0)

    'Apply the file type choosen to the file list displayed filDialog.Pattern = filterList.Text

    The filterList is the list box with the file type extensions and the filDialog is the list box with the files.

    It only filters on the first file type, so in this case TIF (no BMP), even if you swap them it only filters on the first

    file type.

    Can anyone shed some light on this? i have seen other examples (limited) on the web and it says to do as ive done, why

    doesn't mine work? is there a project reference i have to add in?

    Thanks,

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“It works on my machine.” - Anonymous