Groups | Blog | Home
all groups > vb.net > february 2007 >

vb.net : OpenDialog which extension gets used


Frank
2/9/2007 10:44:48 PM
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

Newbie Coder
2/10/2007 5:19:07 AM
You have a default extension property which you can specify.

OpenFileDialog1.DefaultExt = "*.jpg"

--
Newbie Coder
(It's just a name)

Frank
2/10/2007 8:57:36 AM
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




[quoted text, click to view]

Frank
2/10/2007 11:36:06 AM

[quoted text, click to view]
thanks

Frank
2/10/2007 11:36:31 AM
thanks
[quoted text, click to view]

Herfried K. Wagner [MVP]
2/10/2007 4:15:50 PM
" Frank" <frank@a-znet.com> schrieb:
[quoted text, click to view]

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

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button