title: c# - trying to play a video in a picturebox
body: <p>I want to play a small video in a <code>PictureBox</code>. I have a folder on my desktop containing 151 frames with a .png extension. This is what I have already tried: </p>
  
  <pre><code>System.IO.DirectoryInfo di = new DirectoryInfo("c:\\Users\\" + Environment.UserName + "\\Desktop\\fireplace");
  
  foreach (FileInfo file in di.GetFiles())
  {
      pictureBox1.Image = file;
  }
  </code></pre>
  
  <p>This doesn't work because there's an error that says:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type <code>System.IO.FileInfo</code> to <code>System.Drawing.Image</code></p>
  </blockquote>
  
  <p>I don't know how to make <code>FileInfo</code> to an <code>Image</code>.
  (btw. the fireplace folder in the code is the folder that contains the frames.)</p>