Windows Explorer window

.netdev

Member
Joined
Jan 7, 2006
Messages
10
Programming Experience
Beginner
Hello Again,
Thanks for all the help you are providing me
i would like to know if anyone have an idea about how to :

1- open a folder using Windows Explorer window vb.net
i have a button and when i click on it i want it to open the folder using a windows Explorer window

I guess it will be my last question this semester...

Thanks Again
Regards
 
I use the "/e" switch to get explorers default view when opening the Folder.
VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim sPath = "c:\windows"
  Process.Start("explorer.exe", "/e," + sPath)
End Sub
 
Moved to more appropriate forum.

The default action for a folder is to open it in Windows Explorer, so you don't even have to specify the executable:
VB.NET:
Process.Start(folderPath)
although that will open the window "My Computer" style, with a task pane on the left instead of a folder tree.
 
Back
Top