BackgroundWorker question

  • Thread starter Thread starter Seth Williams
  • Start date Start date
S

Seth Williams

I know how to update a status bar using the ProgressChanged event, if all
the processes are in the form.

However, I have a separate class, which does a recursive file copy. In that,
I'd like to update the status bar as each file is addressed. (I have several
places in classes, I'd like to use in order to change the status on the
status bar)
I tried to create a global variable for status, change the variable when
each file was addressed, and then in the ProgressChanged event assign that
global variable to the text of the status bar label, but that didn't work:
sbLblFiles.text=gsStatus

When debugging, the status variable is changed, but it doesn't get reflected
in the status bar.

I also tried making the BackgroundWorker component public, so I could
possibly refer to it in the classe, but that's apparently not possible
either.

Any ideas?
 
I know how to update a status bar using the ProgressChanged event, if all
the processes are in the form.

However, I have a separate class, which does a recursive file copy. In that,
I'd like to update the status bar as each file is addressed. (I have several
places in classes, I'd like to use in order to change the status on the
status bar)
I tried to create a global variable for status, change the variable when
each file was addressed, and then in the ProgressChanged event assign that
global variable to the text of the status bar label, but that didn't work:
sbLblFiles.text=gsStatus

When debugging, the status variable is changed, but it doesn't get reflected
in the status bar.

I also tried making the BackgroundWorker component public, so I could
possibly refer to it in the classe, but that's apparently not possible
either.

Any ideas?

check out this threads:
http://groups.google.com.br/group/m...read/thread/378c7a63102674e1/796345fb67f1694e
solutioned:
http://groups.google.com.br/group/m...read/thread/bed23beb9f7a20c9/ee5acbf0ae15e871

Thiago
 
Back
Top