|
-
May 2nd, 2021, 11:52 AM
#1
Thread Starter
Lively Member
progressbar math
I am trying to process files in a folder.
I use a progressbar to show the progress.
i = number of documents found
Code:
ToolStripProgressBar1.Maximum = i
ToolStripProgressBar1.Step = i / 100
If ToolStripProgressBar1.Step < 1 Then
ToolStripProgressBar1.Step = 1
End If
I noticed that when ToolStripProgressBar1.Step = i / 100 is less then 1 the progressbar doesn't update
So I try to make the step = 1 but I don't think that will work.
Anyone good in math?
-
May 2nd, 2021, 12:14 PM
#2
Re: progressbar math
Code:
ToolStripProgressBar1.Step = i / 100
That makes no sense. You are setting the Maximum value to i, so just set the Step value to 1, and then call
Code:
ToolStripProgressBar1.PerformStep
after each file is processed.
Suggested reading:
https://docs.microsoft.com/en-us/dot...r?view=net-5.0
Including relevant Methods and Properties.
-
May 2nd, 2021, 12:20 PM
#3
Thread Starter
Lively Member
Re: progressbar math
Of course
-
May 2nd, 2021, 07:16 PM
#4
Re: progressbar math
If you issue is resolved, please use the Thread Tools menu to mark the thread Resolved. That way, we can see that you don't need any more help without opening and read the whole thread.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|