Re: BackgroundWorker question



On 16 maio, 14:58, "Seth Williams" <s...@xxxxxxxx> wrote:
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/microsoft.public.dotnet.languages.vb/browse_thread/thread/378c7a63102674e1/796345fb67f1694e
solutioned:
http://groups.google.com.br/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/bed23beb9f7a20c9/ee5acbf0ae15e871

Thiago
.



Relevant Pages

  • BackgroundWorker question
    ... I know how to update a status bar using the ProgressChanged event, ... However, I have a separate class, which does a recursive file copy. ... I'd like to update the status bar as each file is addressed. ... When debugging, the status variable is changed, but it doesn't get reflected ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Application Configuration is Incoorrect
    ... i'm using visual studio 2003. ... status bar displays 'Build Succeeded' but a message box appeared with this ... Error while trying to run project: Unable to start debugging. ... Reinstalling the application may fix this problem. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Namespaces, or getting function foo.bar() declarations to work
    ... like it and it impacts debugging, ... functions are common on non-trivial javascript and if their use really ... And function debug would output something like ... Given the dynamic nature of javascript, it's even possible that 'bar' is bound to other scope, so maybe something like ...
    (comp.lang.javascript)
  • Re: Initiating a class
    ... I am trying to write a program that has a separate class file to the ... to use a separate class (Bar) from within Foo's main? ... Bar.method; from within Foo. ...
    (comp.lang.java.help)
  • Re: file could not be found on localhost
    ... In the status bar is ASP.NET Development Server - Port 1073, ... click on Start Debugging I get the error: ...
    (microsoft.public.dotnet.framework.aspnet)