473,503 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OpenFileDialog - show only files modified after certain date

hi,
I'm opening a file dialog in a vb.net form.

I want to show only files modified after a certain date.
Is there anyway to filter for this?

Thanks

Feb 22 '06 #1
2 2653
> I want to show only files modified after a certain date.
Is there anyway to filter for this?
Not with the OpenFileDialog that is built-in. You could certainly create
your own, though.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
To a tea you esteem
a hurting back as a wallet.
"dermot" <df*****@tommyfrench.co.uk> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... hi,
I'm opening a file dialog in a vb.net form.

I want to show only files modified after a certain date.
Is there anyway to filter for this?

Thanks

Feb 22 '06 #2

"dermot" <df*****@tommyfrench.co.uk> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
hi,
I'm opening a file dialog in a vb.net form.

I want to show only files modified after a certain date.
Is there anyway to filter for this?


No. But there is a good reason:

Obviously it can't actually provide direct support for all possible filters
but the reason that it doesn't provided an extensible filter support is to
do with security - Even an untrusted app can be allowed to ask to open a
file via the dialog precisely because it does not expose any information
about the file system to the calling app and it does not allow the app to
disguise the dialog's appearance.

NB To take advantage of this security feature you must call OpenFile() as
this requires only FileDialogPermission whereas File.Open(dialog.FileName)
and other methods of opening a file require FileIOPermission

If you want to do create your own dialog will have to have FileIOPermission
and you cannot derive from OpenFileDialog for the same security reasons.
Feb 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5696
by: Lina | last post by:
Hello, I wanted to ask if anyone can help me complete the following code. I found this example while searching through help documnets. What i want to achieve is to open a dialog box that lets...
1
2312
by: Johann Blake | last post by:
A number of posts have indicated developers having problem getting an OpenFileDialog to startup in a specific directory when the dialog is shown. The first time you show the dialog, the...
1
2814
by: Sebastian Santacroce | last post by:
Hi, How do I get the Date Modified from a file that was selected with the OpenFileDialog? Thanks,
13
6077
by: Randall Arnold | last post by:
I'm not happy with the order in which OpenFileDialog retrieves multiple selected files. I want them in Date order, oldest to newest, but by default they come in by filename, last to first. The...
6
872
by: Mike | last post by:
Hello all, I'm trying to work with the openfiledialog and being new to vb and vb.net I'm having some problems. Wherever I have Me.OpenFileDialog1 I keep getting the following error: C:\Visual...
8
4071
by: Z.K. | last post by:
I would like to display two different types of files when bringing up the OpenFileDialog, but I can't seem to figure out how to do this. I can manage a single file type or all file types, but not...
2
4294
by: Peted | last post by:
Hi i have a circumstance where a user unzips a file, with a certain layer of directories to get to a textfile. So in any directory on the HDD they may end up with something like ...
2
1582
by: sillybob123 | last post by:
Hello, I was hoping someone could help me with my recent problem i have 1 OpenFileDialog and i want the user to only open 1 sort of file so this is what i have If ReadCon.GetName(OFD.FileName)...
2
2548
by: ragazzo | last post by:
I am using this code to load files But i have problem when there is a large number of files, ( it shows nothing ) is it posible to list only files where date modified is today`s date. And show in...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.