How to display file transfer progress [C# 2002]
So - to that end - I created a new form (frmFileTransfer) that will display the File Name, Source, and Destination to the user while the IO File Copy is occuring - so I did something like this:
Main Form
this.hide();
frmFileTransfer fFileTransfer = new frmFileTransfer;
fFileTransfer.show();
foreach (string sFile in sFilesToCopy)
{
string sSource = ...;
string sDestination = ...;
fFileTransfer.SetDisplay(sFile, sSource, sDestination);
File.Copy(sSource + sFile, sDestination + sFile, true);
}
fFileTransfer.close();
this.show();
File Transfer Form
public void SetDisplay(string sFile, string sSourcePath, string sDestinationPath)
{
tbFileName.Text = sFileName;
tbSource.Text = sSourcePath;
tbDestination.Text = sDestinationPath;
}
Where tb = TextBox (to display the FileName, Source, and Destination to the User).
Most of you are already reading this going "doh this won't work" as I assume I am violating some thread laws but obviously this method ends up blocking (holding hostage) both forms (the calling one doing the file transfer as well as fFileTransfer) - what can I do to unblock fFileTransfer so that it can show the progress to the user without freezing up as it does now?
I thought forms where seperate threads so I don't see why fFileTransfer is blocked at all when the IO File Copy occurs...I thought of using a delegate I just have no clue how that could be implemented...
Any help would be greatly appreciated.
Thanks,

