A powerpoint presentation .ppt or .pps displays its thumbnail in windows explorer.
How can I generate powerpoint thumbnail to be displayed in a picturebox or datagridview image column ? Can someone show/point me to code ?
Thanks
Printable View
A powerpoint presentation .ppt or .pps displays its thumbnail in windows explorer.
How can I generate powerpoint thumbnail to be displayed in a picturebox or datagridview image column ? Can someone show/point me to code ?
Thanks
Explorer is reading the files metadata. Try a Forums search for thumbnail or such asit should be universal to the file.
I'm still searching for a way to extract powerpoint metadata.
Most code shows how to get thumbnails for image files only.
This one's already been answered for you - within the thread http://www.vbforums.com/showthread.php?t=527704, you can use the C# code found, compile this into a dll and reference in your VB project to find the thumbnail of an office or graphic file type.
I was playing with this at the weekend for you and it only looks at the exposed thumbnail image of a powerpoint file. From my testing it seems this will default to a copy of the 1st slide you have. However this thumbnail referencing only retreives a small or large thumbnail and no other images stored within the file (I was trying to use this in order retreive an image of each powerpoint slide within a given file at the weekend for you, unfortunately this method doesn't perform that task/is not for reading images within files apart from thumbnails).
Thanks Alex. I can settle for the 1st slide thumbnail. And thanks for the testing you're doing.
All I did for this part was follow what was already advised on your other thread here...
1) You're using VB Express 2008. First off then, download C# Express 2008 also and install this free from the MSDN website.
2) Open this and create a new C# class library project.
3) Goto the Experts Exchange site listed within the above link and copy all the code from TheLearnedOne's accepted solution there. Paste this over/into the class shown within your class library project.
4) Goto project > references menu and add from the 1st, .Net tab, a reference to System.Drawing.
5) Compile this project and you'll get a DLL.
6) Open your VB.Net project up and use the project > add reference menu again, this time selecting the browse tab. Pickup the DLL you just compiled.
7) Start writing the code! Like so:
Code:Dim myCSharpDLLClass as new ShellThumbnail
Dim myThumbnailImage as bitmap = _
myCSharpDLLClass.GetThumbnail("C:\Path\PowerPointFile.ppt")