How could I program the progress bar to scroll/increment and move back and forth to act like its working? Reaching 100% is not a concern ... just want it to look like its busy.
Thanks!
Printable View
How could I program the progress bar to scroll/increment and move back and forth to act like its working? Reaching 100% is not a concern ... just want it to look like its busy.
Thanks!
I used this in my latest app. I set the timer tick to 75 ms and enable disable at appropriate times. I implemented the random color change for entertainment value while waiting...change the color on every timer tick and its gets really interesting.
Code:Private Sub progressTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles progressTimer.Tick
Static i As Integer = 0
If i >= Me.ToolStripProgressBar1.Maximum Then
Dim rnd As New Random
Dim newColor As System.Drawing.Color = Color.FromArgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255))
Me.ToolStripProgressBar1.ForeColor = newColor
i = 0
End If
i += 1
Me.ToolStripProgressBar1.Value = i
End Sub
You want to notify the user that "something is happening"? Thats what the marquee style is for. Check the progressbars Style property ;)