Do something while copying

  • Thread starter Thread starter carmen
  • Start date Start date
C

carmen

Is it possible to show some movement in the screen while copying a file?
I tried to use a timer that change the position of an image but when I start
the copy of a file from diskette all is stopped until the copy finishes.
Any ideas? Thank you
 
OK, I did but need to know when the copy is finished in order to stop
the timer that moves the image and I don't know how to do this.
Thank you for your help.
Carmen
 
carmen gonzalez said:
OK, I did but need to know when the copy is finished in order to stop
the timer that moves the image and I don't know how to do this.

You would use Control.Invoke from the second thread to call a method on
the UI thread.
 
Sorry Jon but I don't know how to do that.
this is my code

Thread Copy = new Thread(new(ThreadStart(CopyDisk));

static public void CopyDisk()
{
File.Copy(path1,path2,true);
}
...
private void button1_Click(object sender, System.EventArgs e)
{
Copy.Start();
}

Thank you for all your help.
Carmen
 
carmen gonzalez said:
Sorry Jon but I don't know how to do that.

That's why I gave you a link to an article before which goes through it
all in detail. Please read it all - particularly the Windows Forms
section - and then come back if you've got any further questions.
 
Back
Top