title: Progress Bar Freezes part way
body: <p>So in the snippet of below I very simply look in a specific folder and copy the images from the source to the destination.</p>
  
  <p>The copy is VERY fast and it works great for the first bunch of folders (maybe 20 or so) which takes a few seconds.  But then the progress bar stops moving and I get a spinning mouse cursor.  I can look in the destination folder and it is still processing the folders.  </p>
  
  <p>When it's done I get the the "Process Complete" dialog box, the progress bar is 100% and everything ran fine.</p>
  
  <p>Just want to make sure the end user doesn't think it's frozen.</p>
  
  <pre><code>private void readInvoices()
          {
              string InvoiceFile = txtInvoiceFile.Text;
              //read in the text file and get all the invoices to copy
              string[] Invoices = File.ReadAllLines(InvoiceFile);
              //set the max val of the progress bar
              progBar.Maximum = Invoices.Length;
  
              try
              {
                  //for every invoice
                  foreach (string invoice in Invoices)
                  {
  
                      //Set the source and destination directories
                      string sourceInvFolder = string.Format(@"{0}\{1}", txtSource.Text, invoice);
                      string destInvFolder = string.Format(@"{0}\{1}", txtDest.Text, invoice);
                      DirectoryInfo SourceDI = new DirectoryInfo(sourceInvFolder);
                      DirectoryInfo DestDI = new DirectoryInfo(destInvFolder);
  
                      //we know we have it in the CSV but does the directory actually exist?
                      //if so then let's process
                      if (Directory.Exists(SourceDI.FullName) == true)
                      {
                          //let's copy of the files
                          CopyAll(SourceDI, DestDI);
                          RenameFolder(sourceInvFolder);
                      }
                      //inc the progress bar
                      progBar.Increment(1);
                  }
              }
              catch (Exception ex)
              {
                  MessageBox.Show("Error" + ex.Message);
              }
              finally
              {
                  MessageBox.Show("Process Complete");
                  CleanUp();
              }
  
  
          }
  </code></pre>