title: c# using Microsoft.DirectX.AudioVideoPlayback how to play next video after one is finished
body: <p>i am able to put a video in my windows form.</p>
  
  <p>my question is how do i make it when it finishes playing the video,it starts to play another video? meaning like in a sequence. after it finishes, play another video.</p>
  
  <p>so far i have manage to play a video and it just loops the video.</p>
  
  <p>any ideas?</p>
  
  <p>this is my code so far:</p>
  
  <pre><code>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;
      }
  </code></pre>