SaveFileDialog won't show existing file

N

Nayan

Hi,

I am trying to download a file from website, and to get the local file
name form the user, I am using SaveFileDialog.

I apply the filter (I parse the url to get the file name and assign) to
the saveFileDialog object.
But if my file already exists, it's not shown in the window.

Has anybody ever experienced something this?

regards,
Nayan
 
T

Tom Porterfield

Nayan said:
Hi,

I am trying to download a file from website, and to get the local file
name form the user, I am using SaveFileDialog.

I apply the filter (I parse the url to get the file name and assign) to
the saveFileDialog object.
But if my file already exists, it's not shown in the window.

Has anybody ever experienced something this?


It sounds like you are not using the correct format for the filter. The
format is "File Type|extension". So if they were downloading a zip file,
the filter might look like "Zip Archive|*.zip".
 
N

Nayan

Hi Tom,

Yes, you are right. I wasn't using the right filter.
I saw the example on web and used it. But it wasn't right. I was using
brackets like "Jpeg (*.jpg)|(*.jpg)";

Thanks a lot!

regards,
Nayan
 
D

Dave Sexton

Hi Nayan,

The following will work:

"Jpeg (*.jpg)|*.jpg"

The purpose is to display the valid extension to the user, which I find to
be useful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top