Click or drag to resize

ShellBrowserSetThumbnailProvider Method

Allows to set a callback function that can supply a thumbnail image in case the system cannot provide one.

Namespace:  Jam.Shell
Assembly:  ShellBrowser.Winforms (in ShellBrowser.Winforms.dll) Version: 6.3.1
Syntax
public static void SetThumbnailProvider(
	ThumbnailUnavailableHandler pMethod
)

Parameters

pMethod
Type: Jam.ShellThumbnailUnavailableHandler
The callback function that can supply a thumbnail image.
Remarks
This is a global setting for each instance of a program. The given bitmap will be freed automatically when no longer needed.
Examples
This sample code loads a default image for each thumbnail which cannot be provided.
private void ThumbnailUnavailable(string pPath, System.Drawing.Size pSize, out Bitmap pBitmap)
{
    pBitmap = new Bitmap(@"X:\Images\dummy_thumnail.bmp");
}

private void FormMain_Load(object sender, EventArgs e)
{
   ShellBrowser.SetThumbnailProvider(ThumbnailUnavailable);
}
See Also