Results 1 to 2 of 2

Thread: [VB6] ucShellTree: Full-featured Shell Tree UserControl

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2010

    Post [VB6] ucShellTree: Full-featured Shell Tree UserControl

    ucShellTree v2.0
    Released 12 Jun 2018

    Designed for navigating the Windows Shell, like my recent Shell Browser Control, ucShellBrowse. This UserControl shows an Explorer-style TreeView of the entire shell, descended from the Desktop like normal. It's very similar to the INamespaceTreeControl in functionality and features, but a manual implementation allows a few extras that aren't available, like automatically handled tri-state checkboxes and open-to-path, and the ability to implement further customizations.

    Key Features
    • Displays complete Explorer-type tree with either Desktop, Computer, or a custom path as the root folder.
    • Tri-state checkboxes show partial selections when check mode is enabled, 4th state with red x is available as an option.
    • Supports drag/drop with modern drag images and drag-over-highlighting (including expanding on hover), based on my cDropTarget project. Can drop on all valid drop targets: folders, zip files, programs, shortcuts to them, etc.
    • Right-click shows the standard Explorer context menu for the clicked item
    • Automatically monitors for changes (item created, deleted, renamed) and updates the tree accordingly.
    • Option to show files as well
    • Can automatically expand to a given path.
    • InfoTips with several lines of details depending on file type are shown as ToolTips
    • Filter option can limit the type of files displayed (or even folders)
    • Can rename in place using LabelEdit
    • Can (optionally) treat .zip/.cab files as a folder
    • Optional additional root entry for 'Favorites' that shows the Links folder.
    • Browses the Network folder too and returns paths as \\Share\etcetc
    • Complete Unicode support

    Works with ucShellBrowse
    This project is similar to my recent ucShellBrowse control, and indeed if you prefer a TreeView to the dropdown for navigation, this control works well with it-- since it can be put into FilesOnly mode. There's a demo project of this setup in the \DemoSB folder (ucShellBrowse DL'd separate, grab the latest version from the ucShellBrowse project thread).

    -Windows Vista or newer
    -oleexp 4.42 or higher (not needed once compiled into OCX)

    Strongly recommended: Common Controls 6.0 Manifest (see here). The Demo projects have a manifest added for when they're compiled, but the IDE and your own projects will need their own. The control works without it, but some features are broken. The Checkboxes use transparency, they'll need to be replaced with ones that do not (otherwise a black box is around them). I haven't fully explored what other things might break without it.

    DemoSB: In the DemoSB folder, there's a project that shows the use of ucShellTree with my ucShellBrowse control. This requires ucShellBrowse to be present in the same root as ucShellTree (e.g. C:\vb6\ucShellBrowse and C:\vb6\ucShellBrowse).
    Attached Files Attached Files

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2010

    Re: [VB6] ucShellTree: Full-featured Shell Tree UserControl

    ucShellTree 2.0 has been released!

    This update brings in a number of new features in addition to some minor bugfixes. The partial checks/autochecking is now optional (and exclusion checks can be added), you can now specify any folder as the root, get/set checks by path, and more. Here's the full changelog:
    '-You can now specify a custom folder as root*. Changeable during runtime.
    '-Added PathGetCheck and PathSetCheck functions. The Set function also has an option to
    ' expand to show the given path in the event it's not yet visible.
    '-The OpenToPath/OpenToItem functions now have an option to just expand to but not select
    ' the item, primarily for the check set function but available in general; default=select.
    '-The .InitialPath property is deprecated. The creation sequence has changed, you can
    ' now just use OpenPath in your Form_Load (or equiv.) event. It remains for compatibility.
    '-Added RootHasCheckbox option to set whether or not one appears (when checkboxes are enabled).
    '-Added ExclusionChecks option, which adds an additional checkbox state- a red x. The .ExcludedPaths
    ' method functions in the same way as the .CheckedPaths method to retrieve paths in this state (they
    ' are not counted as checked).
    '-Added ExplorerStyle option to allow control over whether the Explorer visual style is applied.
    '-Added HorizontalScroll option, to set whether the tree expands without needed HScroll.
    '-Adjusted the RootHasCheckbox option so that if it's changed at runtime, the correct state is set.
    '-Changed disable criteria such that valid file drop targets are excepted from normal disabled prop
    ' list. This was mainly to get the Recycle Bin enabled since it's completely browsable. Other items
    ' remain disabled. (You can change this in TVExpandFolder if desired).
    '-Added Autocheck option for control over whether partial checks are shown and whether parent and
    ' child items are automatically changed according to a new check action.
    '-The control will now fall back to plain checkboxes if no Common Control 6 manifest is present, but
    ' all autocheck functionality is unavailable (even checking all children of a checked parent).
    ' Previously checkboxes were not present at all without a manifest.
    '(Bug fix) The outer edge of the control on dragover indicated a droptarget on no item but
    '          seemingly valid; it now correctly shows no drop is possible.
    '(Bug fix) Invalid (malformed/corrupt) shortcut files caused an error that wasn't handled, so
    '          the item enumeration when expanding a folder stopped when it reached it.
    '(Bug fix) When you call GetParent on your user folder, you get the desktop instead of \Users\,
    '          this caused some issues with auto-navigating.
    '(Control/code) So I thought you needed to supply your own check imagelist for partial checkboxes,
    '               since the extended style wasn't working, but it turned out the problem was just that
    '               you can't set the TVS_CHECKBOXES style; just TVS_EX_PARTIALCHECKBOXES. So the images
    '               have been removed, which eliminates transparency issues and will keep the appearance
    '               the same as the OS.
    '* - Technical note: This can be any path string/identifier resolvable by SHCreateItemFromParsingName

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width