|
-
Nov 16th, 2018, 10:24 PM
#11
Re: [VB6] ucShellBrowse: A modern replacement for Drive/FileList w/ extensive feature
Version 5.0 Released
This is a major update with tons of new features.
Some of the highlights:
- Custom folders: You can specify a list of files from anywhere on the system and display them together in a single folder.
- Graphics options: You can now add a background image (in a position or tiled), change the background color, change the foreground (font) color, and change the font.
- Groups can now be collapsed and subsetted.
- High DPI scaling is now supported.
The release zip contains 4 different demo projects:
\Demo - The standard project demo, with the color changes shown above (you can change them back in the regular design mode on Form1)
\Demo2 - Minimalist options that mimic the original VB Directory and Files control.
\Demo3 - The two-control setup pictured in post #2 where you use two different ucShellBrowse controls for an alternative layout.
\DemoEx - Full-sized browser setup working with ucShellTree. NOTE: Requires ucShellTree which is downloaded separately - Get it here, then put \ucShellTree next to \ucShellBrowse

Custom font, tiled background, and no border.

Ratings stars, subsetted groups, custom foreground and background colors

Automatically populated Special Folders submenu for the Bookmarks menu.
Version 5.0 Changelog
Code:
'v5 (Released 16 Nov 2018)
'-Can display a custom set of files from anywhere on the system. Call the method
' CreateCustomFolder with a list of full paths and other options. Shell context
' menus won't work with multiple files (will execute on focused item), but some
' custom handlers have been added, and it works normally for a single file.
' nIcon can be left as 0 for a standard folder icon, -1 for a search folder icon,
' or any icon index in the system imagelist.
'
'-Control now fully supports high DPI scaling. This requires the dpiAware=True
' value in the manifest. The default manifest, resImages.res, includes that
' setting, but if you want to disable it, resImages-NoDpiAware.res is identical
' except for that setting, and can be readily swapped into this project instead.
'
'-If the 'Rating' column is loaded in Details View, either as a default column
' or selected from the column list, the rating will now appear as a series of
' stars that you can manipulate just like Explorer. Fully supports groups.
' NOTE: This requires the PNG_RT* images in the resource file.
'
'-Additional checks were added before renaming files. This catches errors not
' caught by watching keys, like reserved filenames, invalid filenames made of
' valid characters, and overall path being too long.
'
'-Some virtual folders, like Network Connections for example, have a custom set of
' columns that are not part of the regular property system, so previously could
' not be loaded. They're now viewable through some custom handling.
' This routine also exposes custom columns in virtual folders like 'Network' where
' prior versions could only show the columns that were standard.
'
'-Added a 'Special folders' submenu on the Bookmarks menu containing a number of
' common special folders. You can adjust/add/remove the ones you want in the
' GenerateSpecialFolderMenu/GetSpecialFolderMenuItem methods. Virtual folders are
' supported.
'
'-Added the Bookmarks menu to the View Menu when showed from a folder background
' right click. This is still controlled by the Bookmark Button property, so the
' submenu is only added if the button is (or would be) visible. This allows the use
' of bookmarks without the List Control Box or in Files Only Mode.
'
'-The font for the ListView/Combo/Status can now be changed. (Borrowed from Krool's
' ListView. Thanks!)
'
'-Added CustomColor event, which allows you to set a custom font color and background
' color on an individual item and subitem basis. The file index and file name are sent,
' along with the column index and the system name of the property it's displaying --
' e.g. if the 1st column after the name is size, SubItemIndex=1 and SubItemProp="System.Size"
'
'-Better support for drag-out of virtual objects that can have shortcuts created.
'
'-Added property to control whether sorting is allowed or not.
'
'-Added option to disable Wow64 file system redirection.
'
'-Added ExplorerStyle option to toggle visual styles (defaults to Explorer Theme)
'
'-Added SnapToGrid option. This only applies in icon / small icon / tile views.
'
'-Added HeaderDragDrop option.
'
'-Added TrackSelect option (the selected item follows the mouse pointer).
'
'-Added BorderStyle select with None, Standard, Thick, and Thicker options for the LV.
'
'-Added property SelectedColumn (for runtime only, won't appear in Properties design box).
'
'-Added additional methods to get file info: FileCount, FolderCount, FilePathFromPos and
' FileItemFromPos (which returns a files IShellItem).
'
'-You can now set a background image for the file browser ListView. There are 3 sources
' supported: A normal VB picture you can set in the UserControl Properties box, a Sub
' to directly pass an HBITMAP, and a Sub to pass a URL.
' PictureAlignment and PictureWatermark options are present and apply to all three image
' sources. Special thanks to Krool, the Picture option was adapted from his ListView
'
'-Added BackColor property, added ForeColor property for the main item text, and also
' ForeColorSubitem for the subitems when using Details View (Report Mode).
'
'-Added experimental Extended Tiles view mode. The layout is similar to Explorer's Content
' view, but I don't know how to use columns other than the ones that Detail View had.
' This option is disabled by default. If you want to try it, go down to the User Consts section
' immediately after these comments and change bHideContentViewMenuItem to True.
'
'-Added 'Enabled' option to enable/disable everything on the control.
'
'-Groups can now be subsetted: Only a certain number of items are shown with a link at the
' bottom to show more. Set the count with GroupSubsetCount and the text of the link with
' GroupSubsetLinkText. It defaults to no subsetting and there's default text of "Show more items"
'
'-Groups are now collapsible. Added GroupStartCollapsed option to set them collapsed by default.
'
'-Misc. adjustments to the Details Pane layout to support different DPI scaling and make better
' use of the space to avoid unneeded truncations.
'
'-When you click on a text field you can edit in the Details Pane, the textbox background will now
' turn white like it does in Explorer, and back to transparent when out of focus. This is to make
' it more clear that an edit is in progress.
'
'-Checkboxes can now be toggled during runtime, and there's a FileCheck event when checked/unchecked.
' Also, added FilesChecked() method to get list of checked items, and FileGetCheck and FileSetCheck to
' toggle checkmarks by name.
'
'-(Bug fix) View Menu and Bookmarks Menu did not work on Windows 10 due to missing FOLDERID_ values.
'
'-(Bug fix) Some internal file data was not being updated after a rename, which
' caused failures in the shell context menu commands.
'
'-(Bug fix) There were a number of circumstances where actions on virtual objects,
' usually in virtual folders, failed. Most of these have been corrected
' thanks to the methods developed for the virtual folder custom colsets.
'
'-(Bug fix) 'New folder' and 'Paste' commands are now disabled in the menu when in
' folders where they will not work.
'
'-(Bug fix) Corrected some spacing issues in the Details Pane when DPI scaling is on.
'
'-(Bug fix) In Files Only mode, the ListControlBox would slight reappear if the control
' was resized to a small width then resized back. This was related to the
' feature to auto-hide it; the control didn't check the mode so always restored.
'
'-(Bug fix) If the UserControl was not placed in the top left of the form, the column
' select popup would appear in the wrong place. The reason was that the only
' way I could get it to appear on top of everything was to set its parent
' as UserControl.ContainerHwnd; no other method including SWP HWND_TOP worked.
' So it was being placed relative to the form, instead of to the UC. Fixed.
'
'-(Bug fix) Some virtual locations, like Network Connections, were not showing the help text
' (for the status bar) with the right-click menu; these folders seem to not support
' the IContextMenu2 interface that was used. But the text only needs the base
' IContextMenu, so that was made into a module-level var as well used in 2's place.
'
'-(Bug fix) When Group Mode was active and the folder changed, sometimes the group item count
' was not updated or displayed the wrong number.
New Events
| CustomColor(ItemIndex, ItemName, SubItemIndex, SubItemProp, rgbFore, rgbBack) |
Item position and filename, the column number, and the system property name-- e.g. System.Size. Set rgbFore and/or rgbBack as desired, leave unchanged to stay with the current defaults. |
| FileCheck(Index, sFile, fCheck) |
When Checkboxes are enabled and there's a change. fCheck = 0 for unchecked, fCheck = 1 for checked. File position and full path are sent. |
New Methods
| CreateCustomFolder(Title, Files(), Icon) |
View files from around the system together. Specify full paths for file list. If Icon is -1, the Saved Search system folder icon is used. If 0, a plain folder icon. If >0, specifies system imagelist index. |
| FileCount |
Returns the number of non-folders. |
| FolderCount |
Returns the number of folders. |
| FilePathFromPos |
Returns the full path of the zero-based position of entries. |
| FileItemFromPos |
Same, but returns an IShellItem. |
| PictureSetByHBITMAP |
Specify an HBITMAP instead of picking the Picture property normally. |
| PictureSetByURL |
Same, by URL. |
| FilesChecked() |
Returns a list of the full paths of checked items. |
| FileGetCheck(FileName) |
Get check status by filename. |
| FileSetCheck(FileName) |
Set check status by filename. |
New Properties
Enabled
Font
AllowSorting
DisableWow64Redirect
ExplorerStyle
SnapToGrid
HeaderDragDrop
TrackSelect
BorderStyle
SelectedColumn
Picture, PictureAlignment, PictureWatermark
ForeColor, BackColor, ForeColorSubitem
GroupSubsetCount, GroupSubsetLinkText
GroupStartCollapsed
Last edited by fafalone; Mar 26th, 2021 at 05:13 AM.
Reason: Removed month-old time sensitive message
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|