I am struggling to find a way on how to get any file thumbnail into my userforms picturebox (The image visible in windows explorer) using visual basic.
I have only found how to do that for image files
Dim image As Image = New Bitmap(file) 'File is a full path to the file
'Resize and preserve aspect ratio
Dim Ratio As Double = CDbl(image.Width / image.Height)
Dim H As Integer = 150
Dim W As Integer = CInt(H / Ratio)
'Set image
.Image = image.GetThumbnailImage(H, W, callback, New IntPtr())
But it doesn't work for any other type of files.
Could someone, please,help me with this code?