PowerShell Studio 2015 – New FolderBrowserModernDialog Control

With release of the v4.2.83 build of PowerShell Studio 2015, we introduced new features that we are covering in detail over a series of articles.

This next new feature was also added in response to user feedback. This particular user wanted to use the modern version of the folder browser dialog that is available in the later versions of Windows. Unfortunately, the user had to manually add code to the form to accomplish this. Therefore we added a new control to our toolbox:


This control will display the modern version of the FolderBrowserDialog on Windows 7 or greater:

Modern Folder Browser

If running on a legacy OS, it will then display the original FolderBrowserDialog:

Legacy Folder Browser

You can find the new control in the ToolBox Panel:


To add the dialog, simply drag and drop it into your existing form.

The new FolderBrowserModernDialog has the following properties:


This property sets the title of the folder browser dialog.


This property sets the selected path of the dialog and returns the path the user selected.


Using the Dialog:

Here is an example of how to display the FolderBrowserModernDialog using its ShowDialog method:

    $folderbrowsermoderndialog1.SelectedPath = $textboxPath.Text
    if ($folderbrowsermoderndialog1.ShowDialog() -eq 'OK')
        $textboxPath.Text = $folderbrowsermoderndialog1.SelectedPath


The modern versions of the FolderBrowserDialog makes for a better user experience and we hope that your GUI users agree.