1

so following the directions here, I re-created the following 3 lines in VB.NET

 Dim shellFile As ShellFile = shellFile.FromFilePath(tmpFile)
 Dim shellThumb As Bitmap = shellFile.Thumbnail.ExtraLargeBitmap
 shellThumb.Save("C:\Users\erizvi\Desktop\thumb", ImageFormat.Bmp)

However, when I execute these lines, all I get is a thumbnail of the 'word' logo, rather than the actual file, can anyone tell me why?

Community
  • 1
  • 1
Art F
  • 3,992
  • 10
  • 49
  • 81

1 Answers1

2

Only certain file types, mainly visual media files, support thumbnailing in Windows. If your file is not an image or video file, there's really nothing to display except the icon associated with that file type (usually assigned by the primary application that consumes them, like Word for .doc/.docx files). Basically, if Windows doesn't render an image representation of the file in Thumbnail or Filmstrip view of the folder in Windows Explorer, you won't be able to do any better with the ShellFile API wrapper.

KeithS
  • 70,210
  • 21
  • 112
  • 164