thiago costa

thiago costa

  • NA
  • 319
  • 0

webBrowser1 progressBar1 ERROR ... Seems like I am the only one

Dec 26 2010 12:05 PM
Hello there guys, The progress fine works partialy, but the debuger finds an error...

This is the error:

progressBar1.Value = (int)e.CurrentProgress;
Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
Parameter name: Value

This is the code:

[CODE]

private void webBrowser1_Progress(object sender, WebBrowserProgressChangedEventArgs e)
       

         progressBar1.Maximum = (int)e.MaximumProgress;
         progressBar1.Value = (int)e.CurrentProgress;
       

[/CODE] 

Also I tried this:

[CODE]


progressBar1.Maximum = Convert.Toint32(e.MaximumProgress);

progressBar1.Value = Convert.Toint32(e.CurrentProgress);


[/CODE]


Any ideas??
Thank you !

Answers (7)