ImageEn, unit imageenio

TImageEnIO.LoadThumbnailFromExplorer

TImageEnIO.LoadThumbnailFromExplorer


Declaration


function LoadThumbnailFromExplorer(const FileName : WideString; iDesiredWidth : Integer = 120; iDesiredHeight : Integer = 120): Boolean;


Description


Retrieve the thumbnail for the specified file from Windows Explorer. This should work for any format that displays a thumbnail in Windows Explorer, including images and videos.
Use iDesiredWidth and iDesiredHeight to specify the size of the thumbnail that you require.

The Aborting property will be true if the load fails (e.g. if there is not a thumbnail for this file type).


Example


// Load a thumbnail for a video
if ImageEnView1.IO.LoadThumbnailFromExplorer('D:\MyVideo.wmv') = False then
  ShowMessage('Load Error!');