I'm programatically creating a folder using C# and need to set the default view of the folder to "Thumbnails".
The relevant registry keys are listed here: http://support.microsoft.com/kb/812003
However, "Remember each folder's view settings" would need to be selected in order for changes in that KB article to take effect. It seems like it would be 'bad behavior' for a program to change this without specific user prompting.
Update: For the desktop.ini, I've never had much luck using it; however, this site seems to list a few CLSIDs that may be worth looking into: http://www.xs4all.nl/~hwiegman/desktopini.html
Specifically the [ExtShellFolderViews] section. I gave it a whirl but didn't have any luck.
Assuming you do this yourself using a ListView
, you can either set the View
property to LargeIcon
or if that's not enough (you mention Thumbnails) you should probably set OwnerDraw
to true for the items and draw them yourself.
The only way I know to manipulate this setting is through pInvoke, but it looks like there is no message to set the view to Thumbnails. Here is a code snippet targeted to WinXP.
Call IFolderView::SetCurrentViewMode with FVM_THUMBSTRIP
Not sure which explorer window you should query IFolderView from though. There could be multiple explorer windows on the user's desktop, those running under a higher integrity level would deny you access if you are from a lower integrity level.