Browse DevX
Sign up for e-mail newsletters from DevX

Code Download

The MB BrowseForFolder Control

Date: Sep 30, 2000
Author: Marco Bellinaso
Description: If you want to show the "Browse for Folder" dialog in your own application, this is the tool for you. It enables you to change any dialog's property, such as its caption, foreground color, font, TreeView styles (HotTracking, SingleClickExpand, LinesAtRoot and so on), a textbox to manually type the folder name, and a label control to display the currently selected folder. You can also decide to display folders only, folders and file, printers or the Internet neighborhood. The control exposes a set of events that let you know when the dialog is about to be displayed (so that you can select an initial folder) and when a user selects a folder, and you can cancel the standard dialog action. You can also learn everything about the item that is currently selected: its path and display name, its small and large icons, its description, the type of exe (if it is an executable file), all its attributes. If the user selected a folder, you can determine whether it is shared or has any subfolders. The package contains both the control and a class module, so that you can use all the functionality even if you don't have a form to place the control on. There is also a FolderTree control, a special TreeView control that automatically shows the file system structure and all its item. You can use it to create an even more customized "Browse for folder" dialog or to add a file/folder browser into your own application. Get the source code.

Click here to download the file.

Thanks for your registration, follow us on our social networks to keep up-to-date