Good morning,

I have been trying to research the net on the subject of "how to set a folder view utilizing a VB.form button", I've found references to the "IFolderView : SetCurrentViewMode Method", but no concrete examples I could work with.
I haven't been able to find what I need to solve my problem.
- Click a button on my form.
- It opens a folder.
- As it opens the folder the view of that folder it opens is set to "details" and the folder is "maximized"

I have the button that opens the folder portion, but I desperately need help with the detail and maximize portion.

Could somebody let me know of a tutorial or a solution please?

Thank you for your help,


could you please tell us how you "open the folder"? like you open it with the explorer or do you display the folder names in your form?

I open a the folder with Process.Start ("explorer" "path")
I can post my exact code if necessary.


not sure if i got this right...

Dim browser As New Diagnostics.Process
        With browser
            .StartInfo.FileName = "explorer.exe"
            .StartInfo.Arguments = "/e, I:\cygwin\"
            .StartInfo.WindowStyle = ProcessWindowStyle.Maximized
        End With

this opens the folder, maximise the explorer window and shows in details view.

here are the options for windows explorer:
/e List (explorer) view, Show large icons if missing (Open view)
/root Sets the top level folder.
/select Specifies that the directory should be selected without displaying its contents.
/s no idea what this does tbh
/n Do not open the selected directory, no effect on NT
/idlist,%I Expects an ID/handle. May help with cacheing. By itself, opens the desktop as icons.
/inproc Stops display of window (I don't know why this is useful but anyway)

Thank you very much GeekByChoiCe,

This code example is very helpfull to me, if I may ask a little more detail on the code on line 4:
StartInfo.Arguments = "/e, I:\cygwin\"
I looked on MSDN site for the various switches that could be used instead of the /e switch but I didn't find it.
So I tried /d, /f,/g, but all give me an error message telling me that the path was invalid.
The reason I am asking is because the folder window I am opening does open maximized but on my system it opens it open with the tiles view instead of the detail view.
For reference the testing system is Windows XP pro with SP2.

Thank you,

The view of folders are saved into the windows registry.
to set the change the view of a folder on unknown PCs is pretty dangerous and mostly not even wanted by the owner of this computer. anyway i have found a website that explains how to do it but keep in mind that windows only saves 400 seperate folder views and its a pain in the ass to figure out which one is the right on to modify.

click here to read about it

else google helps

Thank you for all your help GeekByChoiCe,