# VBForums UtilityBank > UtilityBank - Components >  [VB6] Shell Controls OCX

## fafalone

*ShellControls for VB6 11.0.2.7*
ShellBrowse 11.0 and ShellTree 2.7
Updated 25 Jan 2022
I'll be posting my ShellBrowse and ShellTree controls as a single OCX from now on in addition to the regular versions for anybody interested in using them this way.

Both controls are marked Safe for Initialization and Scripting with IObjectSafety.

The zip includes SxS resources to create programs that use the ocx registration-free. In your project with the ocx, simply include either manifest-- one also includes Common Controls 6.0 and is highly recommended, the other simply the sxs info, then install the ocx to the same directory as the exe and you're good to go, the control won't need to be registered on the end-user machine.

The source code is identical to the public releases, but I'm attaching them with the project file used to compile the ocx so you can produce a hash-identical version to verify. 
*For all the sample projects and version history, download the source from the ShellBrowse and ShellTree main threads.* The attachment here is just the barebones version required to build the OCX.

*Requirements:* 
-oleexp.tlb is still required in the IDE if you need to use any events with an IShellItem or IShellItemArray parameter, or if you're going to use one of those from the control properties in your project.

-Also: It is very strongly recommended that any projects with these use Common Controls 6.0 manifests.
This zip also includes a generic .res file for your projects that adds ComCtl6 support, or a .manifest version to insert into your own resource.

*Current Version Updated Jan25 2022 to use ucShellBrowse v11.0 and ucShellTree 2.7*

Older Updates
*UPDATE (3/22): Project updated to use ucShellBrowse 9.5 R1.*
*UPDATE (3/25): Project updated to use ucShellBrowse 9.5 R2.*
*UPDATE (4/03): Project updated to use ucShellBrowse 9.6 and ucShellTree 2.6.*
*UPDATE (4/22): Project updated to use ucShellBrowse 9.6 R3*
*UPDATE (4/23): Project updated to use ucShellBrowse 9.7*
*UPDATE (4/24): Project updated to use ucShellBrowse 10.0*
*UPDATE (4/28): Project updated to use ucShellBrowse 10.0 R2*
*UPDATE (4/29): Project updated to use ucShellBrowse 10.0 R3*
*UPDATE (4/29 (again)): Project updated to use ucShellBrowse 10.0 R4*

----------


## fafalone

*Demo for OCX Version*
Here's a brand new demo that references the OCX version. It's set up as a file processor: Configured to display a bare minimum, to gather a list of files, list them by their name, but store them by their full path to process them.

The CommonControls 6.0 Default Resource that's included with the OCX is demo'd as well.



The TreeView is using all default settings except PlayNavigationSound = False, since the ShellBrowser will play that sound.

To configure the ShellBrowser to get the above, here's all the Properties that have been changed from their default:
AutosizeColumns = True - The ColumnHeader is invisible but there. This keeps its width to the control width with no horz scroll.
ControlType = SBCTL_FilesOnly - Only the ListView. No ComboBox, Control Box, Search Box, or NavButtons (but they will appear on View menu).
DefaultColumns = (blank) - This leaves only the Name column there by default.
DetailsPane = False - No room for it.
EnableLayout = False - Keep the Layout submenu off the View Menu (right-click on background).
EnableNewFolder = False - Can't create a new folder when FilesOnly = True. A future version will hide the New Folder item automatically.
EnableSearch = False - Searching should be unavailable.
FilesOnly = True - The TreeView is right next to the control, no need to duplicate folders.
HideColumnHeader = True - We're using Details View to keep files in a single verticle column, not really show Details View.
LockColumns = SBCL_LockNoUser - Otherwise new folders would load new columns.
LockView = True - No room for other views, keep them off the View background menu.
MultiSelect = False - Right now our demo isn't handling multi files selected.

And that's it, now you have a plain, basic file display despite the complexity of the control!  :wave: 

Other options to keep in mind: If you right-click the background, the View menu still has some options enabled: The Bookmarks submenu is present, Group By is there but can only group by name. The rest should be fine; Back/Forward, Sort Direction, Copy Path, Select All, Refresh, and Properties; Paste works fine... pasted folders will be invisible but there, pasted files are added to the view.

----------


## fafalone

*Known Issues*
The same Known Issues from the project pages apply, in addition to the follow unique to the OCX.

When you first create a ShellBrowse control, the ListView header displays a black system font instead of the control font. You do not need to do anything about this, the correct font will be displayed when run and then subsequently in design mode as well. It's unknown why this happens.Other fonts may also be defaults instead of what they were set to by defaulting to the font of the control parent, just run or reload the form to refresh them, again no need to change.

----------


## yokesee

very good work.
This issue went unnoticed for me. I have almost no time to go into other subforums XD
better use the two controls together
I have the same problems oleexp 4.8 and codebank 4.8
a greeting

----------


## MountainMan

fafalone,

I have your latest version v11.0.2.7 dated 1-25-2022. I can't get it to register 64-bit Windows 10). I have unregistered the older version and then copied the .ocx to SysWOW64 and tried to register it. No joy. I have copied it over the older .ocx version and that generates an error in VB6 when trying to use your controls. Have you gotten this version to load on your PC? Also, since UCShellTree is now at version 11.1 can yo update the .ocx to account for the latest version? Thanks.

----------

