Results 1 to 6 of 6

Thread: VS2010 - How do you give Progress Bars Different Colors.

  1. #1

    Thread Starter
    Addicted Member Reapism's Avatar
    Join Date
    Sep 2012
    Posts
    170

    Question VS2010 - How do you give Progress Bars Different Colors.

    VS2010 - How do you give Progress Bars Different Color.



    *I was wandering to make my application more colorful, To give a different color to progress bars.

    *I have tried searching in the past but didn't have any luck.

    *Is there some sort of property I didn't know about that allows you to do so?


    *If there is a quick way to do it please feel free to reply. If I need to download something thats fine as well.

    Please leave all information in the reply!

    Program Version: Visual Studio 2010 Ultimate
    Language: Visual Basics
    Last edited by Reapism; Sep 30th, 2012 at 10:35 AM.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: VS2010 - How do you give Progress Bars Different Colors.

    Nope. The progress bar inherits its colours from the visual style employed by Windows on the user's computer so even if you change it on your computer it won't necessarily appear the same on another one.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: VS2010 - How do you give Progress Bars Different Colors.

    This is a progressbar control that I often use. Half way down the page there is an updated version of the control (Version 1.2).

    Please note this code will not work properly when visual style is not enabled.

    http://emoacht.wordpress.com/2011/10...-visual-style/

  4. #4
    Fanatic Member
    Join Date
    Dec 2007
    Location
    West Yorkshire, UK
    Posts
    791

    Re: VS2010 - How do you give Progress Bars Different Colors.

    You could always use a label as a progressbar and set the BackColor as you require. It is not as pretty as the progressbar control itself, but it is simple and effective.
    Code:
        Private Sub Form1_Click(sender As Object, e As System.EventArgs) Handles Me.Click
            ProgressBar1.Value = 0
            Timer1.Interval = 100
            Timer1.Start()
            Label1.Width = 0
        End Sub
    
        Private Sub Timer1_Tick(sender As Object, e As System.EventArgs) Handles Timer1.Tick
            ProgressBar1.Value += 1
            Label1.Width += 3
            If ProgressBar1.Value = 100 Then
                Timer1.Stop()
            End If
        End Sub

  5. #5
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: VS2010 - How do you give Progress Bars Different Colors.

    Why not use a picturebox and you could paint different colors as you desire
    starting dark blue going to light blue then going red then green im not sure if you want different colors or just one different color if only one color tou can try espanolita's way

  6. #6

    Thread Starter
    Addicted Member Reapism's Avatar
    Join Date
    Sep 2012
    Posts
    170

    Re: VS2010 - How do you give Progress Bars Different Colors.

    How would I be able to do this with picture Box's Will it look similar and have the animation that the progress bar itself has? I just really like customization that's all.

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
  •  



Click Here to Expand Forum to Full Width