Click here to Skip to main content
13,409,720 members (36,658 online)
Click here to Skip to main content
Add your own
alternative version


22 bookmarked
Posted 9 Mar 2005


, 9 Mar 2005
Rate this:
Please Sign up or sign in to vote.
An article about adding Alan Zhao's Color Progressbar to your statusbar.

Sample Image


This article shows how to easily add Colour Progress bar, by Alan Zhao, to your Windows Form status bar. It's quite simple to do it, of course our friend Alan did a very good job, now we have to use it...

Using the code

See how to create and use Colour Progress bar on Alan Zhao's article.

Now I'm only going to explain how to add a progress bar to your status bar. First, you have to have a Windows Form with a status bar and then create you progress bar. Take a look at the code below:

using ColorProgressBar;

namespace WindowsApplication3
    /// Summary description for Form1.
    public class Form1 : System.Windows.Forms.Form
        private ColorProgressBar.ColorProgressBar progress;
        public Form1()
            // Required for Windows Form Designer support

            // TODO: Add any constructor
            // code after InitializeComponent call

            #region Add a Alan Zhao Color ProgressBar
            // progress bar declaration
            this.progress = new ColorProgressBar.ColorProgressBar();
            // lets set progress bar size
            this.progress.Size = new Size(200, 20);
            // lets set progress location
            // to (statusBarPnel1.Width + statusBarPanel2.Width)
            this.progress.Location = new Point(200, 2);

            //Lets set some proprieties of progress bar
            // Bar color
            this.progress.BarColor = Color.AliceBlue;
            this.progress.Maximum = 100;
            this.progress.Minimum = 0;
            this.progress.Step = 1;
            this.progress.BorderColor = Color.Gray;
            this.progress.Value = 0;
            this.progress.FillStyle = 

            // Add progress bar to statusBar
            // show progress bar

            // reset counter
            this.button1_Click(this, EventArgs.Empty);



There are four important steps:

  1. Take special attention about the dimensions of your status bar and make your progress bar to fit in the statusbar:
    this.progress.Size = new Size(200, 20);
  2. Once your progress bar fits into your status bar, make it appear on the right place by locating it into your status bar, like this code exemplifies:
    this.progress.Location = new Point(200, 2);
  3. Add it to your status bar:
  4. Finally show it:

Isn't it simple?! Sure it is. Now you have just to use your StatusColorProgressbar.

Points of Interest

I was searching for a thing like this to use on my "projecto de bacharelato" - PICrega. I have read many articles on "The Code Project”, but none of them was like what I wanted. Then, I searched and researched and I made one like I wanted. That makes me feel so good, so nice! paparara_ra.

The thing is: you might add other controls to you status bar using: statusbar.Controls.Add(your control).


I'd like to thank all "The Code Project" members, and personally Alan Zhao who made a very nice Colour ProgressBar.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Engineer Freelancer
Portugal Portugal
No Biography provided

You may also be interested in...

Comments and Discussions

Newsthank you Pin
matafill++c23-Jun-11 9:54
membermatafill++c23-Jun-11 9:54 
GeneralThank you ..... Pin
Jack297-May-08 21:04
memberJack297-May-08 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180221.1 | Last Updated 9 Mar 2005
Article Copyright 2005 by AlexMartins
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid