Thanks.
I did all the above.
I changed Picturebox's AutoRedraw to True.
I changed its scalemode to Pixels.
And changed the code as follows:
Code:
VIDEO_FILE = "C:\MyFiles\MyVids\Music\Classical-Music\J.S. Bach - St. Matthew Passion, BWV 244 _ Aria- -Erbarme dich, mein Gott.mp4"
Picture1.Cls
hBitmap = GetFileThumbnail(VIDEO_FILE, 0, Picture1.Width, Picture1.Height)
Call hBitmapToPictureBox(Picture1, hBitmap)
Picture1.Refresh
DeleteObject hBitmap
This produces a very large thumbnail (far larger than the Picturebox). Therefore the Picturebox shows only a small part of the thumbnail's top-left corner.
Now, if I go to design mode and hugely enlarge the Picturebox in design mode, and run again, it again produces a very large thumbnail. This time the thumbnail shows completely inside the Picturebox, but the thumbnail's size is smaller than the Picturebox (because now the Picturebox is huge)
I don't know how to get it to show the thumbnail properly resized to fit the Picturebox.
Please note that the Picturebox's dimensions are to remain fixed. The thumbnail should be produced in the right size to fit the Picturebox.
Please advise.
Thanks.