thiago costa

thiago costa

  • NA
  • 319
  • 0

How to change Label Text in a event?

Dec 29 2010 7:18 PM
Hello there guys !

I am having a bit of trouble.
This is the code:

  private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{

if (e.CurrentProgress == 0 || e.CurrentProgress == 90000000)
{
//progressBar1.Value = 90000000;
progressBar1.Value = 0;
progressBar1.Value = (int)e.CurrentProgress;
progressBar1.Value = 90000000;
}
else
{
return;
}
}
private void lblprogress_ChangeText(object sender, EventArgs e)
{
if (progressBar1.Value != 90000000)
{
LBLprogress.Text = "Loading";
}
else
{
LBLprogress.Text = "Finished";
}
}


That code seems not to be working...
What I am trying to do is:

If progressBar1's value, is not 90000000, change LBLprogress's text to Loading, Otherwise Finished..
What am I doing wrong ??

Thanks guys

should I replace EventArgs with something else? I tryed LabelEditHandler and it gave me a delegate error.

Answers (6)