We get up early so that you don't have to. |
Shell MegaPack .Net 7.0, $starting at $295
Sky Software
http://www.ssware.com/megapack.htm
If you've ever tried to program the Windows shell, even under .NET, you've probably discovered that it's a twisty little API of nasty passages. There are good historical reasons for that, but there aren't really good reasons why you should put up with them if all you want is to display a user interface similar to that of the Windows Explorer somewhere in your own application. If you need file and folder browsing - along with the ability to customize every facet of the display and behavior of the UI - then buying a copy of Shell MegaPack can save you a while lot of effort. Sky Software has taken the nuisance of the Explorer UI and wrapped it up into three custom controls with sensible .NET APIs on the outside for you to play with.
What you get here is the FolderView control (for the treeview in the left pane), the FileView control (for the flexible view of files in the right pane), and the ShComboBox control (for the dropdown list of folders). Each control comes equipped with all the properties you could want to set its initial state, as well as a good set of events for customization at runtime. Of course, the three controls are made to be integrated together:
shCmbBox.FolderView = fldrView
fldrView.FileView = flView
With those two lines of code and three controls, you can create the bulk of a clone of Explorer itself. There are MSDN-style API help files documenting the controls, but the bulk of the useful help is in an extensive set of samples for each control, which go through everything from the basics to adding your own custom overlay icons to selected files to customizing the thumbnail view to adding to the context menus of the various controls and objects. All of the samples are available in both C# and VB .NET.
There's also a fourth control here, the ShellObjects control, which is sort of a utility player. It gives you MSN or Office 2000 popups ("toast") displayed in a single line of code, tray notification icons with XP style balloon tips, and the ability to easily program against .lnk and .url files. Given the number of hack-o-matic solutions I've seen for toast and tray icons, this one alone could save a whole batch of code for many applications.
Not everyone needs the Explorer UI, of course. But if your application needs it, in some more sophisticated form than a "File Open" dialog box, it looks like Shell MegaPack could save you a bundle of time and frustration. And that, after all, is precisely the point of buying custom controls.
Mike Gunderloy is the lead developer for Larkware and author of numerous books and articles on programming topics.