Giter Site home page Giter Site logo

fafalone / shellcontrols Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 60.57 MB

Shell Browser and Shell Tree Controls

License: MIT License

Visual Basic 6.0 100.00%
activex-control twinbasic vb6 windows-shell shell windows-explorer component control com-control

shellcontrols's Introduction

ShellControls

Shell Browser and Shell Tree Controls

ucShellBrowse v12.2 and ucShellTree v2.9.2 BETA

Updated 12 May 2024

CRITICAL BUG FIX RELEASED - ucShellBrowse v12.2

This repository contains a twinBASIC x86/x64 compatible port of my shell controls, ucShellBrowse and ucShellTree.

See the original threads for a full list of all of the extensive features of these controls:

[VB6] ucShellBrowse: A modern replacement for Drive/FileList w/ extensive features

[VB6] ucShellTree - Full-featured Shell Tree UserControl

These are beta versions.

There's still some work to do in twinBASIC to complete user control support, but it's now far enough along even a massively complex control like ucShellBrowse can run. Notably, there's numerous issues with sizing and scaling. The demos included in this repository have worked around them as best I could. Also, I haven't exhaustively tested all features. Please don't hestitate to create an issue for any bugs you encounter.

Using these controls in your project

Requires twinBASIC Beta 513 or newer

Important

Now requires twinBASIC 513 or newer.

The demos are all set to open and run, to set these up in your project:

These projects use WinDevLib, the x64-compatible successor to oleexp.tlb written in twinBASIC. First add a reference to 'Windows Development Library for twinBASIC' in Settings->COM Type Library / Active-X References by clicking TWINPACK PACKAGES and selecting it from the list, or manually downloading it from it's repository.


Files:
ShellControlsTB.twinproj - Project file for building OCX controls.

ShellControlsPackage.twinpack - Contains both controls as a tB Package and can be added via the same references location (Import the file, it's not on the package server yet). This reference must come before WinNativeForms; tbShellLib must still be added. Note that packages are read-only when added to a project.

tbShellBrowseDemo.twinproj - Main ucShellBrowse demo project.

tbShellTree.twinproj - Main ucShellTree demo project.

FileDialogDemo.twinproj - Demo of combining ucShellBrowse and ucShellTree controls to make a highly customizable Open File dialog.

UCSBDemoVB.twinproj - Demonstrates use of ucShellBrowse configured as replacements for the built in VB/tB file controls (DriveListBox, DirListBox, and FileListBox).

As an alternative, to have them in an editable form, for ucShellTree, you need to import ucShellTree.twin and ucShellTree.tbcontrol. For ucShellBrowse, import ucShellBrowse.twin and ucShellBrowse.tbcontrol.

Update

IMPORTANT: These controls now require twinBASIC Beta 513.

Update highlights:
-Thumbnail view in ucShellBrowse is now fixed -OCX builds now working in all hosts, tested in tB, VB6, Excel/Access 2021 x64. -New ucShellTree features

ucShellBrowse v12.2.0 BETA Update - CRITICAL BUG FIXES


'New in v12.2 BETA (Released 12 May 2024)
'
'-(Bug fix) Workaround for Details or List view to Small Icon view freeze issue.
'
'-(Bug fix) PathCompactPath Unicode mismatch caused crashing on Windows 11.
'
'-(Bug fix) m_GroupSubset and m_GroupSubsetLinkText weren't initialized.

ucShellBrowse v12.1.0 BETA Update

'New in v12.1 BETA (Released 18 April 2024)
'
'-Made LVS_EX_DOUBLEBUFFER an optional style (ListViewDoubleBuffer, default True)
'
'-Updated IWebBrowser[App] implementation to use Boolean for VARIANT_BOOL instead
' of Integer (along with updating tbShellLib version which made this change).
'
'-Pointer math operations are now large-address safe, allowing safe use in apps
' or as an OCX with LARGEADDRESSAWARE enabled.
'
'-Errors loading a single file are no longer fatal to the entire folder; also
' generally improved error handling in load folder routines.
'
'-(Bug fix) Thumbnail view broken in all modes except 32bit compiled.

ucShellTree v2.9.2 BETA Update

'v2.9.2 
'
'Special thanks to VBForums user Mith for his incredible work helping with new features
'and bug fixes! Credit goes to him for most of the changes in 2.9.2 alpha and final.
'
'-Added ShowOnlyFileCheckboxes option: When Checkboxes = True and ShowFiles = True, will 
' show checkboxes only for files.
'
'-Try to load cached icons first
'
'-Minor sizing adjustment to eliminate 4px border.
'
'-(Bug fix) Default share/shortcut overlays not showing.
'
'-(Bug fix) New icon methods didn't properly support running without ComCtl6.
'
'-(Bug fix) Always Show extensions wasn't working.
'
'-(Bug fix) Disabling of Wow64 redirection wasn't reverted on terminate.
'
'-(Bug fix) If DPI awareness was on, IconSize would continuously grow.
'
'v2.9.2 (ALPHA, 29 Jan 2024)
'-New FileExtensions property to choose between following Explorer's setting for hiding
' known extensions, over forcing them to always show.
'
'-Added property CheckedPathCount.
'
'-Added UserOption mNeverExpandZip, to prevent expansion of .zip when ShowFiles = True.
'
'-(Bug fix) Border property not restored correctly due to re-reading it with the wrong
'           name from the property bag.
'
'-(Bug fix) Opening to a custom root would add the root as a child of itself.

ucShellTree v2.9.1 Update

-(Bug fix) AutoCheck = False not respected when expanding a checked folder (thanks to 
            VBForums user Mith for report and fix) 
 -(Bug fix) When AutoCheck = False and CheckBoxes = True is set at runtime, checkboxes 
            improperly cycled through partial checks. This is currently fixed as a work- 
            around that will not work properly if ExclusionChecks = True (and AutoCheck 
            = False), but it may be some time before I Can run down a proper fix.

ucShellTree v2.9 Update
image

I have not updated the joint projects yet-- the controls package or the FileDialogDemo. Only tbShellTree.twinproj and ucShellTree.twin/tbcontrol have been updated to 2.9. I'll look at the others next week after the new tB beta is out.
ucShellTree v2.9 now supports icons of any size, instead of the fairly small fixed sized ones.

R1 of ucShellBrowse and R2 of ucShellTree update tbShellLib to 2.6.62 to correct improperly defined hex literals, and correct a few local ones as well.

ucShellBrowse v12.0 Changelog

-There's now a RegisterWindow option that, if True, will register this control as
 a shell window. It will be seen by the system as if it were an Explorer window,
 and can be interacted with via IShellView, IShellBrowser, IFolderView, etc, which
 includes responding to APIs such as SHOpenFolderAndSelectItems. 
 For instance, if you use your web browser to download to C:\download, and this
 control is open to C:\download, and you click the 'show in folder' button, it
 will select the file in this control rather than open an actual Explorer window.

 Programs like my 'List open windows and properties' demo will also be able to
 obtain all that information from this control. See the following:
 https://www.vbforums.com/showthread.php?818959
 All members that are applicable to this control have been implemented, with the
 exception I don't intend to implement the FolderItem, Folder, etc interfaces
 for use with IShellFolderViewDual/shell.application.

 Some features must be implemented by the host form/application. For instance,
 in order to respond to requests to close the window, see e.g.
 https://www.vbforums.com/showthread.php?t=898235 the control will raise the
 new RequestExit event, letting your app know the window should close.

 This option is False by default. Not available in DrivesOnly mode, DirOnly
 mode, or DirOnlyWithCtls mode.
 NOTE: If you have multiple ShellBrowse controls showing the same path, it's
       strongly advised only one registers as a shell window.

-Added LinkshellTree sub to store hwnd for associated ucShellTree; for 
 IShellBrowser.GetControlWindow only for now, but may do more in the future.

-Added DropdownShowFullPath option to show the full path in the path dropdown.

-Added ListViewAlphaShadow option, an undocumented feature that applies an alpha
 shadow to ListView labels when in Icon modes (Medium Icon, Large Icon, XL Icon,
 Thumbnail, and Custom, in this control).

-Added NoScroll (LVS_NOSCROLL) style option.

-(Bug fix) Column header text could sometimes become corrupted due to early
           release of temporary strings.

-(Bug fix) This control is labeled as supporting Windows Vista, but some
           ListView features that were available on Vista didn't work as the
           control only used the Windows 7+ version of IListView. This has been
           corrected and all features supported on Vista are available.

The Demos

Here's the included demos in this repo:

Basic Shell Tree Demo - tbShellTree.twinproj:

image

Main Shell Browser Demo - DemoMain.twinproj

image

ucShellBrowse as an upgrade to native VB/TB controls - UCSBDemoVB.twinproj

image

Fully customized file open dialog - FileDialogDemo.twinproj

Shows combining ucShellBrowse and ucShellTree:

image

Older Updates

(Jan 22 2023) ucShellBrowse R2: Previously described error handling for categorizer errors had mistkanely been removed.

(Jan 20 2023) All code updated to R1: IPAO hooking code has been integrated into ucShellBrowse and ucShellTree, rather than as a separate module. As a separate module it couldn't be in both, there would be a conflict or it would be missing. But twinBASIC's support for AddressOf on class members makes having it as a standard module unneccessary. ucShellBrowse now loads the navigation sound even when not set by Explorer, the default in Win10, with a user option to disable this behavior if not desired. Additionally, the property descriptions from the VB version have been added to ucShellTree.


I'll add more in the future. Note that while due to the difference in typelib and IPAO-hooking methods, you can't directly import VB projects with these controls, you should be able to recreate any of the other screen shots.

shellcontrols's People

Contributors

fafalone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shellcontrols's Issues

Small Icon view freezing on switch

It may just be me. Please comment if you experience this as well. It's impacting the 12.x VB development version too, but not the VB6 11.2 last public release. Disabling shell window registration made no difference.

UCSB 12 Beta does not build in recent tB versions / Controls invalidated by font change

Got a couple messages about this so wanted to make a note of two serious bugs in twinBASIC currently impacting these controls:

-If you try to change the font in recent tB builds, the control becomes corrupted and will need to be deleted/replaced or project reverted. If you need to change the font, you can load the project in tB Beta 224, change it, then go back to 237.

-Version 12 of ucShellBrowse is posted as a beta release; it runs from the IDE but can't be built due to a bug using Implements on interfaces that inherit from something other than IUnknown/IDispatch.

These issues should be fixed soon.

ucShellBrowse OneDrive issues

Selecting OneDrive in the root level of the dropdown currently fails to load.

When navigated to through the regular file system, it loads the Status column, but displays binary data. I'm going to look into this to determine how to know when an image is supposed to be displayed, or at least add a manual override for the System.StorageProviderUIStatus property, and properly display the image in a future version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.