So, I did some research, and I believe my issue is something to do with the GUI update. The thing is, I know nothing about GUI updateing, and every example that iv seen look extremly next level, and I dont understand it (normally when I copy and paste working code online, I have to change up a few things to get it to work for my program specifically, if I dont understand it or how it works, it makes it extrmely more complicated to find an answer) so sorry if this has already been posted.
So, I have 2 forms (well technecally 3, but the first one just opens up the 2nd form)
So, what I am trying to do is use a background worker from Form3 to update a progress bar on Form2. It works, but it doesnt at the same time.
I have used a message box to tell me the value every time it updates using:
Form2.ProgressBar1.Value += 1
MessageBox.Show (Form2.ProgressBar1.Value)
It keeps on itterating correctly
But the progress bar doesnt actually show anything, the bar doesnt actually move to the value it is set to.
So for example, if I where to programically set it to 90, it would still look like its at 0. BUT if I leave the itteration and it passes 100 (so 101) the program will crash and say that its out of the maximum range (obviously)... So, the value part is working, but the actual bar, isnt moving.
Why might this be?
And how might I fix this problem in a simple solution?
I know its a bad idea to use a background worker, but my program is responding to a download/upload feature, so the user will still need the program to respond, and update showing everything they need to know (like time, progress, files left, folders left, transfer rate, etc etc...)
This is why I am using a background worker instead of a timer, because a timer, the program wont be able to respond, and I have found that as the only and fastest method to use.
If you need any more information, I am happy to provide my full programs code for the background worker.
Thank you in advance for any help.
Oh and by the way, I could itterate the program properly if I where to use the same background worker with the same settings, and the same progress bar with the same settings on Form3
So, I have 2 forms (well technecally 3, but the first one just opens up the 2nd form)
So, what I am trying to do is use a background worker from Form3 to update a progress bar on Form2. It works, but it doesnt at the same time.
I have used a message box to tell me the value every time it updates using:
Form2.ProgressBar1.Value += 1
MessageBox.Show (Form2.ProgressBar1.Value)
It keeps on itterating correctly
But the progress bar doesnt actually show anything, the bar doesnt actually move to the value it is set to.
So for example, if I where to programically set it to 90, it would still look like its at 0. BUT if I leave the itteration and it passes 100 (so 101) the program will crash and say that its out of the maximum range (obviously)... So, the value part is working, but the actual bar, isnt moving.
Why might this be?
And how might I fix this problem in a simple solution?
I know its a bad idea to use a background worker, but my program is responding to a download/upload feature, so the user will still need the program to respond, and update showing everything they need to know (like time, progress, files left, folders left, transfer rate, etc etc...)
This is why I am using a background worker instead of a timer, because a timer, the program wont be able to respond, and I have found that as the only and fastest method to use.
If you need any more information, I am happy to provide my full programs code for the background worker.
Thank you in advance for any help.
Oh and by the way, I could itterate the program properly if I where to use the same background worker with the same settings, and the same progress bar with the same settings on Form3