3

I know how to browse folder with dialog. But when I use bellow code:

Dim FBrowserDialog As New FolderBrowserDialog()
FBrowserDialog.Description = "Get Folder"
FBrowserDialog.RootFolder = Environment.SpecialFolder.MyComputer
FBrowserDialog.ShowNewFolderButton = True
If FBrowserDialog.ShowDialog() = DialogResult.OK Then
    'bla bla bla            
End If

I get dialog like this:

But I want like this:

I don't have any idea how to get like this. Any kind of help will be appreciated.

I am using Visual Studio 2010.

Community
  • 1
  • 1
user3428095
  • 61
  • 1
  • 4

1 Answers1

2

Add a reference to the Windows 7 API Code Pack - Shell using Nuget.

The following code snippet gives the dialog theme you want:

Dim dialog As New Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog()    
dialog.IsFolderPicker = True
dialog.ShowDialog()
Phillip Trelford
  • 6,513
  • 25
  • 40