469,602 Members | 1,968 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

OpenFile dialog filter

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
Nov 20 '05 #1
9 14846

Hi John,

Try the following filter

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

or also

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

Robbie

In article <#N**************@TK2MSFTNGP09.phx.gbl>,
jo**@nospam.infovis.co.uk says...
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

Nov 20 '05 #2
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" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... 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

Nov 20 '05 #3
"John" <jo**@nospam.infovis.co.uk> schrieb
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 (*.*)|*.*"
--
Armin

Nov 20 '05 #4
* "John" <jo**@nospam.infovis.co.uk> scripsit:
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?


You will find a sample here:

<http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsFileDialogClassFilterTopic. asp>

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Cor
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
Nov 20 '05 #6
"Cor" <no*@non.com> schrieb
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.


Sorry, I don't understand you.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #7
Cor

Immer das gleiche
"Bilddateien (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|Alle Dateien


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


Nov 20 '05 #8
"Cor" <no*@non.com> schrieb

Immer das gleiche
> "Bilddateien (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|Alle
> Dateien


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"

:-)
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #9
* "John" <jo**@nospam.infovis.co.uk> scripsit:
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?


Filter Property (.NET Framework Class Library)
<http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsFileDialogClassFilterTopic. asp>

Your system date/time is wrong.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by dave | last post: by
1 post views Thread by Mr Gordonz | last post: by
1 post views Thread by Fabiano | last post: by
1 post views Thread by Sean Campbell | last post: by
4 posts views Thread by Marco Trapanese | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.