Windowsフォームにビデオを入れることができます。
私の質問は、ビデオの再生が終了したときに、別のビデオの再生を開始する方法です。シーケンスのような意味. 終了したら、別のビデオを再生します。
これまでのところ、なんとかビデオを再生できましたが、ビデオをループするだけです。
何か案は?
これはこれまでの私のコードです:
public partial class Form1 : Form
{
Video video;
public Form1()
{
InitializeComponent();
Initializevid1();
}
public void Initializevid1()
{
// store the original size of the panel
int width = viewport.Width;
int height = viewport.Height;
// load the selected video file
video = new Video("C:\\Users\\Dave\\Desktop\\WaterDay1.wmv");
// set the panel as the video object’s owner
video.Owner = viewport;
// stop the video
video.Play();
video.Ending +=new EventHandler(BackLoop);
// resize the video to the size original size of the panel
viewport.Size = new Size(width, height);
}
private void BackLoop(object sender, EventArgs e)
{
//video.CurrentPosition = 0;
}