//引用
using DexterLib;
using Microsoft.DirectX.AudioVideoPlayback;
//声明
private Video videoPlay = null;
MediaDetClass mdc = new MediaDetClass();
//播放视频
videoPlay = new Video(this.txtFile.Text);
videoPlay.Owner = this.pnlVideo;
videoPlay.Play();
videoPlay.Pause();
...
//截图,GetBitmapBits()方法要在unsafe模式下调用。
mdc.GetBitmapBits(videoPlay.CurrentPosition, ref size, ref *buff, 328, 240);
mdc.WriteBitmapBits(videoPlay.CurrentPosition, 328, 240, i.ToString() + ".bmp");