BackgroundWorker and Progressbar.Show()

Posted by Juergen on Stack Overflow See other posts from Stack Overflow or by Juergen
Published on 2010-06-10T08:29:28Z Indexed on 2010/06/10 8:32 UTC
Read the original article Hit count: 239

Hi,

I am using Visual Studio 2010 and C# and try to get my progressbar to show but it doesn't work.

I listen to an event. If it happens I want to do some work and show a progressbar while doing that.

This is what I do:

static void Main(string[] args) {
  ProgressForm form = new ProgressForm();
  new FileWatcher(form).Start();
  Application.Run();
}

ProgressForm:
bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
private void bgWorker_DoWork(object sender, DoWorkEventArgs e) {
  this.Show();
  ....
}

but nothing shows. Why isn't that working?

thanks bye juergen

© Stack Overflow or respective owner

Related posts about .NET

Related posts about progressbar