Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1529

[VB6, Vista+] Advanced Thumbnail ListView: Icons, images, videos, framed small images

$
0
0
I was motivated by dilettante's post to finally wrap up some of the advanced techniques I use for a top-tier thumbnail preview ListView. This combines many methods that I and others have developed for generating thumbnails, and combines them to get the best results possible and having fallback options. Not for the faint of heart.

Some of the key features:
-For non-image files, either the full-sized Vista+ style icons are used, or if unavailable the smaller icon appears in a box.
-The same is done for small image files. Instead of scaling up, which looks horrible, GDI+ is used to center and frame small images.
-Supports any image/video type Explorer supports
-Shows custom folder icons at full resolution
-Thumbnails for video files can either be turned on or off (video thumbnail method by dilettante)
-Large range of thumbnail sizes are supported; they can be set to any size you want, not just the common sizes. I'm not sure what the upper limit is but I wouldn't expect good results above 256.
-I've simplified things a little bit by doing this all with a Common Controls ocx ListView, rather than the manually created one normally used.
-Before thumbnail mode is activated, normal icon mode is shown.
-While in normal icon mode, I've incorporated my demo showing how to access and display all file overlays, instead of just the link and share ones. DropBox users rejoice!
-No external dependencies when compiled besides the Windows Common Controls, and only oleexp in the IDE.
-Includes the latest versions of my portable ListView/Header and ImageList definitions modules, current for comctl32.dll 6.1
-Gathers file information through shell interfaces, some never demonstrated in VB before now like IParentAndItem and IShellIcon.
-Detailed debug output; includes my cLog debug logging class to provide the option, by uncommenting a few lines, to log all debug output to a text file so the compiled EXE can have the output too.

Requirements
-Windows Vista or higher
-Common controls 6.0 manifest. The demo project has an internal manifest resource file for when it's compiled, but to run in the IDE your IDE must be manifested as well.
-oleexp3.tlb v3.7 or higher. Dated 13 Jul 2016; no new version was released with this project.
-oleexp3's mIID.bas addon (included in oleexp3 download, must be added to this project).

Rev. 2 - The original post was missing some extraneous functions that prevented compiling and contained an error in handling folder thumbnails that caused a crash in the compiled EXE even though they loaded fine in the IDE. Both issues have been corrected, sorry for that.

Rev. 3 - Forgot one more thing I wanted to do; demo has been updated to show how to copy overlays (shortcut arrow, shares, etc) from the system imagelist and into the thumbnail image as an overlay so that it's drawn on the thumbnails too.
Attached Files

Viewing all articles
Browse latest Browse all 1529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>