There is a lot of build-in ThumbnailProviders inside every installed OS. Due to these providers Windows is able to show Thumbnail of many files. For example Windows Explorer can show content of *.jpg files, but from Solidworks *.sldprt files too (If SolidWorks is installed).
But is there any way to get these thumbnails? I´ve tried to manage this using Windows API CodecPack, but I succeeded only on Windows 7.
ShellFile shellFile = ShellFile.FromFilePath(filePath);
Bitmap shellThumb = shellFile.Thumbnail.Bitmap;
Question is: is there any other usable way to get Thumbnail of any file with registered Thumbnail provider on Windows XP/Vista? I´m really desperate...
You can use unmanaged windows shell methods to get the thumbnail
Here is the code (not a small one)
But results are far from perfect.
There are several ways:
1) With library OpenMCDF. Solidworks file is Compound document so access to its content - is parsing the file.
2) With library EModelView.dll to be added as a control and placed to the Form.
3) With SWExplorer library (wpfPreviewFlowControl)
3) With library Document Manager (SolidWorks.Interop.swdocumentmgr)