OpenFile dialog filter

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I am using the following for the filter but it allows me to display only one
of either an htm or an html file.

dlgOpenFile.Filter = "Html files (*.html)|*.html|Htm files (*.htm)|*.htm"

How can I display both htm & html files at the same time?

Thanks

Regards
 
Hi John,

Try the following filter

"HTML Files (*.htm; *.html)|*.htm;*.html"

or also

"HTML Files (*.htm; *.html)|*.htm?"

Robbie
 
John,
Have you tried:
dlgOpenFile.Filter = "Html files (*.html, *.htm)|*.html;*.htm"

Notice that *.html & *.htm are separated by a semicolon after the vertical
bar. While there is only one Html files.

For a couple of other examples check out the FileDialog.Filter property in
MSDN (or the online help).

Hope this helps
Jay
 
John said:
Hi

I am using the following for the filter but it allows me to display
only one of either an htm or an html file.

dlgOpenFile.Filter = "Html files (*.html)|*.html|Htm files
(*.htm)|*.htm"

How can I display both htm & html files at the same time?

Have a look at the help for the Filter property.

"Bilddateien (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|Alle Dateien (*.*)|*.*"
 
Hi Armin,

I have always trouble doing this nice, I dont know why
"Bilddateien (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|Alle Dateien (*.*)|*.*"

I could paste it as it was without those eggs direct in my program I am busy
with.

It was not for me but beside that thanks.

Cor
 
Cor said:
I have always trouble doing this nice, I dont know why


I could paste it as it was without those eggs direct in my program I
am busy with.

It was not for me but beside that thanks.

Sorry, I don't understand you.
 
Immer das gleiche

Dataeien I read that as "eier"

And I am busy with a program where I need a filedialog with exact this
string (except the *.*).

Cor
 
Cor said:
Immer das gleiche


Dataeien I read that as "eier"

And I am busy with a program where I need a filedialog with exact
this string (except the *.*).

LOL

"Alle Dateien" = "all files"

:-)
 
Back
Top