There are tons of articles out there. Check out the official msdn documentation:
http://msdn.microsoft.com/en-us/library/ms171728(VS.80).aspx[
^]
You did not post the method that updates the progress bar, but the invoke required must be checked in this method.
It should look something like this:
private void setProgress(int nValue)
{
if(progressBar.InvokeRequired)
progressBar.Invoke(new my_delegate(setProgress),new object[]{nValue});
else
{
progressBar.Value = nValue;
}
}
private delegate void my_delegate(int nValue);