Results 1 to 3 of 3

Thread: Progress Bar

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    100

    Progress Bar

    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!

  2. #2
    Member
    Join Date
    Feb 2008
    Posts
    44

    Re: Progress Bar

    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

  3. #3
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Progress Bar

    You want to notify the user that "something is happening"? Thats what the marquee style is for. Check the progressbars Style property
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width