OpenDialog which extension gets used

F

Frank

with OpenDialog
suppose you set
..Filter = "Image (*.ico,*.jpg) |*.ico;*.jpg"

...AddExtension = True

Which extension gets tacked on to the name?



Second question

Looking around I've seen all these extensions. Some, like ICON might have
been simply a typo by someone wanting to type ICO

Are they all used in a way that makes the matching correct

JPG;JPEG

TIF;TIFF

ICO;ICON



Thanks
 
N

Newbie Coder

You have a default extension property which you can specify.

OpenFileDialog1.DefaultExt = "*.jpg"
 
F

Frank

To make it brief I'm afraid I over simplified the string.
Here is a little more of it.
Joint Photographic(*.jpg;*.jpeg)|Tag Image(*.tiff'*.tif)"



do you know if these are all valid extensions to Windows

JPG;JPEG

TIF;TIFF

ICO;ICON



Thanks
 
H

Herfried K. Wagner [MVP]

Frank said:
To make it brief I'm afraid I over simplified the string.
Here is a little more of it.
Joint Photographic(*.jpg;*.jpeg)|Tag Image(*.tiff'*.tif)"

Yes, you'll have to specify pairs of display strings and extensions. Check
out the documentation on the 'Filter' property.
 

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