|
||
|
Thumbnail Extraction Using the ShellExtract thumbnails from any file type which has a Shell thumbnail handler: folders, web pages, images and more! Since Windows Me/2000, the Windows Shell has included a mechanism for extracting a small thumbnail image for any item in the namespace. This sample demonstrates how to use this function to get thumbnail images for web pages, images, Office documents - in fact anything that supports thumbnailing in Explorer. About the SampleThe sample provides a VB class cThumbnailGenerator which provides simple access to thumbnail generation. The methods and properties of the class are:
The sample code demonstrates using the class to extract thumbnails for any file you choose (assuming there is support for thumbnail generation). It includes most of the code for the vbAccelerator Folder Browser which is used to allow you to pick folders or files. Which Thumbnails Can You Get?In Windows 2000 and above, the system by default will provide thumbnail viewers for pictures (BMP, GIF, JPEG, PNG), video files (AVI, MPG etc), Office documents (DOC, PPT, XLS, WMF), Web pages (HTML, MHT) and e-mail messages (EML). Note that Office documents can be previewed only if they've been saved with an embedded preview picture - you need to check the box in the Properties dialog to enable this. However, other thumbnail extractors can be freely added to the system (sample coming soon) so you might have the ability to preview other files. Whilst its probably possible to check whether there is a extractor for a particular file type by looking in the registry, its easier just to try and create a thumbnail for the file - you'll get an error if its not possible.
|
|
|