nimanaqipoor wrote:
<<cross-thread operation="" not="" valid:="" control="" 'textbox'="" accessed="" from="" a="" thread="" other="" than="" the="" it="" was="" created
on.="">>
how can I fix that error?
Don't access the textbox.Text from a different thread, because you can only access controls from the thread that created them. The FileSystemWatcher uses a different thread.
What that means is that you will have to use Invoke on the textbox:
see Here[
^]