title: PictureBox Image Won't Update/Refresh
body: <p>I have an application that has a listbox, and a picture box.  What I need is for when the ListBox.IndexChanged event is struck, the PictureBox image needs to update or refresh.</p>
  
  <p>EDIT: The first time I select something from the list, the image loads up, but when I select another item, the image doesnt update.</p>
  
  <p>I have tried both with no luck:</p>
  
  <pre><code>PictureBox1.Refresh();
  PictureBox1.Update();
  </code></pre>
  
  <p>In the background, when the ListBox1's Index is Changed I have a script running to go to a specific web page and take a screenshot depending on which item is selected in the ListBox and replace the current imageBox's image.  I was thinking that maybe I just wasnt giving it time to go and get the image, so I tried this as well with no luck:</p>
  
  <pre><code>System.Threading.Thread.Sleep(3000);
  </code></pre>
  
  <p>Here is what the application looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/fMCdO.png" alt="enter image description here"></p>
  
  <p>Here is what is on the ListBox1.IndexChanged event:</p>
  
  <pre><code>Process myProcess;
  myProcess = Process.Start("C:/users/bnickerson/desktop/script/RegScript.cmd");
  System.Threading.Thread.Sleep(5000);
  myProcess.Close();
  string imgLoc = "C:/users/bnickerson/Desktop/script/result/last.png";
  pictureBox1.Image = Image.FromFile(imgLoc);
  pictureBox1.Update();
  </code></pre>