My progress window is created by a secondary thread and then updated by it
while a file is uploaded. There's an avi animation control on there that
should show the move file avi. Plus a progress bar.
Im having problems as the screen isn't being redrawn properly. If I call
DoEvents each time then it works ok.
I want to dump DoEvents to prevent problems.
I'm calling the following from the progress property set function.
InvokeRequired always fails (as the thread that created the window is also
trying to update the percentage)
delegate void FloatDelegate(float Percentage);
public void SetProgress(float Percentage)
{
if (InvokeRequired)
{
BeginInvoke(new FloatDelegate(SetProgress), new object[]{Percentage});
return;
}
ultraProgressBar1.Value = (int)Percentage;
Invalidate(true);
Update();
//Application.DoEvents();
}