R
Rich P
I have a simple app that downloads pictures from an ftp server and also
has a user control which is just a blinking arrow. The user control was
hanging during the download process, so I added a backgroundworker
control to the app. This solved the user control haning problem, but I
have another problem now - a crossthread error because I was displaying
each fileName being downloaded on a label on the form. I commented out
that part of the download process and it runs OK.
How can I display the filenames from my list on the label on the form in
the BackgroundWorker_DoWork event without getting a crossthread error?
Do I need to use
if (InvokeRequired)
Invoke(new Change(OnChange), i); //how to use this?
Any suggestions appreciated.
Thanks
Rich
has a user control which is just a blinking arrow. The user control was
hanging during the download process, so I added a backgroundworker
control to the app. This solved the user control haning problem, but I
have another problem now - a crossthread error because I was displaying
each fileName being downloaded on a label on the form. I commented out
that part of the download process and it runs OK.
How can I display the filenames from my list on the label on the form in
the BackgroundWorker_DoWork event without getting a crossthread error?
Do I need to use
if (InvokeRequired)
Invoke(new Change(OnChange), i); //how to use this?
Any suggestions appreciated.
Thanks
Rich