This will cause the ProgressChanged event to fire on the UI thread. The BackgroundWorker object resolves this problem by giving us a ReportProgress function which can be called from the background thread's DoWork function. Had you done this, you would receive a runtime error. It means you cannot use a code such as this. Never access UI objects on a thread that didn't create them. This means one should never call Abort on a BackgroundWorker thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |