This software products is distributed as FREE!
New in version 1.1:
There was an added parameter for restriction of a shell namespace.
Overview:
JurikSoft Folder Browser is a wrapper of SHBrowseForFolder for
using with .NET Framework 1.0 languages, which are not having direct access to SHBrowseForFolder function, such as C# and VB.NET.
JurikSoft Folder Browser distributed as .NET DLL class library.JurikSoft Folder Browser is very simple in use, you should not write more than four - five lines of a source code.
Using: (in C# and VB.NET using Microsoft Visual Studio .NET)
Step 1:
Select Project\Add Reference in Visual Studio .NET environment, in the appeared form click "browse" button and select downloaded
<JurikSoftFolderBrowser.dll> file.
Step 2:
Using of JurikSoft Folder Browser consists in a call of method
BrowseFolder of the following type:
string BrowseFolder ( IntPtr OwnerWindow , string Title, int RootFolder);
Parameters of BrowseFolder method:
OwnerWindow:
[in] Handel of a parent window. This parameter must be null for
normal window (without parent window).
Title:
[in] String of the comment in FolderBrowser dialog.
RootFolder:
[in] ID of Shell Namespace Restriction. For example you can limit
viewing to a network environment.
Return Values:
If the function succeeds and user select folder, the return value
is string containing a path to the selected folder. In other cases, the returned value is null.
PS: The variable <RootFolder> must have any value listed in
JurikSoft.RootFolder, otherwise it takes delault value: JurikSoft.RootFolder.DRIVES.
C# example:
Include this code to any method (for example in button click event):
JurikSoft.FolderBrowser obj_FolderBrowser = new JurikSoft.FolderBrowser();
string string_SaveToFolder = obj_FolderBrowser.BrowseFolder (this.Handle,
"Please select a download folder.", JurikSoft.RootFolder.PROGRAM_FILES);
MessageBox.Show("User selection is: "+string_SaveToFolder);
Screenshot: