Display video thumbmails in a DGV

Ultrawhack

Well-known member
Joined
Jul 5, 2006
Messages
164
Location
Canada
Programming Experience
3-5
Display video thumbnails in a DGV

I'm looking for a way to display thumbnails of all available video files like
avis, wmvs, mpgs, movs
in a particular directory
in a datagridview column

Clicking on a thumbnail should open the relevant video.

I would appreciate any help.

Thanks
 
If Windows Explorer can display thumbnail images of the videos you can get this image with the VB.Net code of article Microsoft Office Thumbnails in SharePoint, you need everything in Code Listing 2 & 3. Some tips: put the code in listing 3 in a namespace. The missing MAX_PATH constant is integer 260.

This image is a large thumb, so call Image.GetTumbnailImage afterwards to get a smaller version that you can put in the DataGridViewImageCell.Value. For example:
VB.NET:
Dim large As Image = GetThumbnailImage("d:\video\some.mpeg", 500, 24)
Me.DataGridView1.Item(0, 0).Value = large.GetThumbnailImage(50, 50, Nothing, Nothing)
DGV has CellClick event, you can for example store the path in the Tag property of the cell and Process.Start this path on click.
 
Hahaha :) you don't know namespace?
VB.NET:
the imports

Namespace whatever

'-> put all that stuff

End Namespace
I'm wondering how to set the thumbnail from frame number xx of each video ?
Simple, you just have to learn how to process video. ;)
 
Back
Top