file filter on more than ONE file type

wanting to know how to filter on more than one file type

Page 1 of 1

1 Replies - 2449 Views - Last Post: 02 August 2010 - 05:03 PM Rate Topic: -----

#1 jacjacjac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 02-August 10

file filter on more than ONE file type

Posted 02 August 2010 - 04:27 PM

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,

Is This A Good Question/Topic? 0
  • +

Replies To: file filter on more than ONE file type

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: file filter on more than ONE file type

Posted 02 August 2010 - 05:03 PM

Use a PIPE (|), not a semi-colon, to separate the description and file type to be filtered.

Example
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1