473,376 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,376 software developers and data experts.

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 15029

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
4
by: dave | last post by:
I have an app that uses the OpenFile Dialog class. When I invoke the ShowDialog method, the hourglass appears and just stays. The dialog window never opens. I created a test form with an...
1
by: Mr Gordonz | last post by:
Hi All, I am trying to replicate the functionality of the HTML FileField control (<INPUT type="file">). It does everything I need but for one thing: I can't programmatically set the value of...
1
by: Fabiano | last post by:
Please, i need to create an webpage that allows user to upload a file to server. I looked up at webcontrols that allow something like this but didn't found anything, just the HTML Control. I...
1
by: Sean Campbell | last post by:
Hi all! I have a problem with the OpenFile dialog that I use in my program. I created a Browse button to allow for the selection of a text file that is processed by my program. The Browse...
0
by: dieter grobler | last post by:
Hi there, I wanted to know if there is a way to specify the default location the OpenFileDialog shows when the browse button is pressed on the FileUpload Control. i.e "c:\program files\". I know...
4
by: Marco Trapanese | last post by:
Hi! I show an OpenFile Dialog with: dlgOpen.ShowDialog() but I'd like to change the default view among Detail, Thumbnail, Icons, ect. Users change the view mode by this button: ...
0
by: jaeden99 | last post by:
I have created a datagrid filled with information from the database. When a user clicks on a particular cell (this cell contains drive letter and file name), I would like to be able to open the...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.