Hey
In my program it gathers files from the internet and in the progress bar I would like to calculate the progress bar.
So, I have a timer ont he form set to 50 interval and disenabled. When the search function is doing it's thing then it turns on enabled.
So say if there is 17 files and it downloaded like 5 files so far. I thought it would be like 17 / 5 * 100. Also, I adjusted the progress bar step.
Here's the code that I adjusted the progress bar step.
CODE
' Update the status progressbar step to 100 divide by amount of images in page.
main_form.StatusProgressBar1.Step = Int(100 / main_form.WebBrowser1.Document.DomDocument.images.length - 1)
Inside the timer1_tick I have this:
CODE
' See if progress bar reached 100 percent
If StatusProgressBar1.Value = 100 Then
StatusProgressBar1.Value = 0
Percent_countlable.Text = ""
ToolStripStatusLabel1.Text = "Done"
Cursor = Cursors.Default
New_SearchCMD.Enabled = True
Timer1.Stop()
Else
StatusProgressBar1.Value = Int((StatusProgressBar1.Value) + 1)
ToolStripStatusLabel1.Text = "Gathering Data..."
End If
Is there a way? Thanks!
Sincerely,
Evolution