Wednesday, May 14, 2008

Defaulting to Thumbnail View when using OpenFileDialog

You would think that it would be very simple to default an OpenFileDialog to any view type you want via its properties. However, there is no property exposed for setting the view type. I simply want to browse for images with my OpenFileDialog instance, and I would prefer for the user not to have to manually set the view type to Thumbnail everytime.

I found a couple of solutions:

http://www.codeproject.com/cs/miscctrl/FileDialogExtender.asp (C#)

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2741273&SiteID=1&mode=1 (same as above only in VB.NET)

and the following offers even more functionality:

http://www.codeproject.com/KB/dialog/OpenFileDialogEx.aspx


If someone else has found or created a better solution, please let me know.

No comments: