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 !
thiago costaPosted Dec 27, 2010, 6:55 PM
I have attached project.zip above.
You guys can check the error if you want. I will give you guys the source..
the name of the program is Self Update:
There are 4 functions:
1) Download Latest Version of c# Generator (an open source software I started)
2) Launch C# Generator (will launch the exe of it.
3) Download Latest Sourcecode (will download latest version of the sourcecode (for the c# generator I am working on)
And finally:
4) Launch Main Thread
This is where I am having the trouble.. if you click on launch main thread, the webbrowser I am working on will open...
There is a progress bar INSIDE the webbrowser... that is the progress bar I am having trouble with...
I put a IF ELSE line there, but that is jst to try to resolve this issue... But it didn't work...
I compiled it with Visual Studio 2010... I hope you guys can help me by looking at my source code.
Thank you. Also, please ignore the progress bar in the Self Update window. That is a totaly different one.
Also... How do I change my profile picture?
This solved my problem :D
Sam HobbsPosted Dec 27, 2010, 3:55 PM
Working with ProgressBar in C#
C# ProgressBar
ProgressBar Class (System.Windows.Forms)
Suthish NairPosted Dec 27, 2010, 3:51 PM
Also, i didnt worked on progree bar.
There is Maximum and Minimum property value for Progress Bar. Please check or wait for more replys from others.
thiago costaPosted Dec 27, 2010, 1:15 PM
I am not a pro like you guys yet...
so...
Suthish, how would I do what you sugested? can I have a hint?
Thanks bro!
Suthish NairPosted Dec 27, 2010, 3:11 AM
thiago costaPosted Dec 26, 2010, 11:10 PM
So... what does that mean? ...
I don't know what to do...
well... that whole thing brings zero errors...
BUT, when i click on debug, as soon as the website loads, the debugger points to it and gives me an error, which is the one I wrote before...
This error is what it says:
Sam HobbsPosted Dec 26, 2010, 10:32 PM