Its very much easy to get the thumbnail of the files supporting the thumbnail view like image files, Dwg files, pdf files........many programs need such kind of thumbnails. in VBA or VB6 projects you just need to add a simple control and set the filepath and thats it it is done!!!....i explain it below.... 5 easy steps to go so be patient.... :)
1. Go to Toolbox where general controls lie like textbox, label, button etc.....
2. right click over toolbox and go to Components...........
3. Select the following type library from controls.......if its not there in list go to browse and add it from system32 folder........add webvw.dll and u ll see this control in list....... if using VBA u might have this library alreay loaded and named "thmb ctrl"........
4. u ll see a blank white control added to your toolbox.....
5. Just put that control on the form and in the code set thumbctl1.displayFile = "path of the file"
5. you could use common dialog to get the filepath.....thats it...u ll get the thumbnail.....!!!
You also get it quick !!!!
Thanks and Regards,
Sachin :)
1. Go to Toolbox where general controls lie like textbox, label, button etc.....
2. right click over toolbox and go to Components...........
4. u ll see a blank white control added to your toolbox.....
5. Just put that control on the form and in the code set thumbctl1.displayFile = "path of the file"
5. you could use common dialog to get the filepath.....thats it...u ll get the thumbnail.....!!!
You also get it quick !!!!
Thanks and Regards,
Sachin :)
Thanks for the infomation.
ReplyDeleteIt worked very well to display DWG and PDF files when I tried in windowsXP enviroment. But it didn't worked in window7.Seems like there is not webvw.dll in windows7.
Is there any similar method to display file's thumbnail in Windows7 ?
Dear Friend,
ReplyDeleteEven I am aware of Windows XP only.... :(