Click here to Skip to main content
Click here to Skip to main content

Fully Customizable XP Progress Bar (with examples)

, 20 Jan 2015 CPOL
Rate this:
Please Sign up or sign in to vote.
A progress bar like the WinXP progress bar control, but completely customizable.


I've developed an XpProgressBar that looks like the one used by the default WinXP theme. I have added a lot of features to fully customize its look.

Very important !!!

If you update the position of the progress bar in a tight loop or in a CPU intensive area and you feel that the bar is not repainted, use the following code in the place where you have problem:


Please don't use Invalidate(), .Refresh() or .Update(). This can result in low performance and sometimes these don't work.

XpProgressBar features

The control offers the following features:

  • Good performance

    The XpProgressBar doesn't use much of the CPU because it uses a double buffer feature that performs painting operations offline to an image and later to the screen (this works at least three times faster).

  • Non flicking double buffer

    This control is implemented with a double buffer to provide smooth animation without any flicking and small paint time.

  • Anti alias text

    All the strings painted in the progress bar are drawn using anti alias hint to provide better quality.

  • Text shadow

    You can set the shadow to the text and customize its color and the alpha channel.

  • Fully customizable

    As you can see, every property of the progress bar can be set to provide a beautiful look.

The properties of the control:

  • BackgroundImage
  • ColorBackground
  • ColorBarBorder
  • ColorBarCenter
  • ColorsXp

    Reset the colors to WinXP default.

  • ColorText
  • GradientStyle
  • SteepDistance
  • SteepWidth
  • TextShadow
  • TextShadowAlpha


You can set the GradientStyle property to obtain some of these styles:

Animation sample

The following picture shows an animation sample with different timers and looks:


The control and the source code are completely free for commercial and non commercial use.


  • 2005-10-1: Article submitted.
    • 1.5
      • Improved the performance of Paint algorithms.
      • Alpha text
      • The image on the ProgressBar looks like a logo (with alpha of course, jeje).
      • Can disable Anti Alias Text.
    • 2.0
      • Vertical ProgressBar (not only horizontal)
      • Text align
      • Border color


Visit my page Marcos Meli and come back with updates soon.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Marcos Meli
Software Developer (Senior)
Argentina Argentina
Marcos Meli v1.0 was released at august of 1980 by Francisco and Mabel Inc.
He´s from Bahia Blanca, Argentina.

He enjoy developing from the 12 years, has a degree in Computer Science, and of course, love this site and .NET in general.

He is the lead developer of the FileHelpers Library.

Marcos is also the co-funder of Devoo.Net.
A company that provides Object Oriented Components & Libraries for .NET developers (mostly open source)

Comments and Discussions

QuestionGreat control but... Pinmemberdjmarcus28-Feb-15 11:31 
AnswerRe: Great control but... PinprofessionalRavi Bhavnani28-Feb-15 12:40 
GeneralRe: Great control but... Pinmemberdjmarcus3-Mar-15 9:32 
QuestionVertical Bar Pinmemberchrispow4-Apr-14 15:38 
QuestionVertical Progressbar? Pinmemberkeyur_patel23-Dec-13 22:29 
Generalthank you Pinmemberauoks4-Jul-13 18:18 
GeneralMy vote of 5 Pinmemberuiqq24-Sep-12 23:35 
QuestionThank you for a well laid out control PinmemberPatMcHargue10-Aug-12 12:40 
Questionthanks PinmemberDon_Hard27-May-12 1:16 
GeneralMy vote of 5 PinmemberDon_Hard27-May-12 1:15 
GeneralThanks very nice Pinmemberkazemtnt13-Jun-11 13:44 
GeneralMy vote of 5 PinmemberGlimmerMan18-Dec-10 21:11 
GeneralI am learning~~ Pinmemberfairy9898-Oct-10 20:39 
GeneralMy vote of 5 Pinmemberkingtouch13-Sep-10 2:00 
GeneralVertical Progress BAR Pinmemberandrew_16612-Jun-08 2:45 
Generalline on the progress Bar Pinmembermaornit6-Nov-07 5:04 
Generalthanks Pinmemberququer9-Sep-07 18:09 
Generalprogressbar on list view Pinmemberanu jaggi2-May-07 2:19 
GeneralTriggering the progressbar from backgroundworker PinmemberUltraWhack19-Apr-07 9:35 
GeneralThanks ! Pinmemberwick9512-Apr-07 5:45 
GeneralGood Job PinmemberJeffro Bodine7-Apr-07 6:30 
GeneralREALLY GREAT! PinmemberSelecters13-Mar-07 5:45 
GeneralRe: REALLY GREAT! PinmemberMarcos Meli13-Mar-07 5:52 
GeneralMagnificent submission PinmemberHuntermonk8821-Feb-07 7:11 
Generalpermission problems Pinmembermerrittholmes16-Feb-07 6:35 
GeneralCan't find Vertical ProgressBar (not only horizontal) Pinmembersilorenz31-Jan-07 0:54 
GeneralRe: Can't find Vertical ProgressBar (not only horizontal) PinmemberMarcos Meli31-Jan-07 8:13 
QuestionCan I Suggest a small improvement ? PinmemberTheDarkMan26-Jan-07 2:03 
AnswerRe: Can I Suggest a small improvement ? PinmemberMarcos Meli26-Jan-07 3:53 
GeneralRe: Can I Suggest a small improvement ? PinmemberTheDarkMan29-Jan-07 21:49 
GeneralThanks Pinmembernapo@burgasnet.com19-Jan-07 2:10 
GeneralRe: Thanks PinmemberMarcos Meli19-Jan-07 3:15 
GeneralMarquee mode Pinmemberroel_v20-Dec-06 19:01 
GeneralColorsXp PinmemberLupineRanger20-Dec-06 3:16 
GeneralRe: ColorsXp PinmemberMarcos Meli20-Dec-06 3:23 
QuestionA great submission! Pinmemberminart4-Dec-06 0:59 
GeneralProblem with anchor property PinmemberMorningkill6-Nov-06 5:48 
GeneralRe: Problem with anchor property PinmemberBengie24-Feb-07 22:58 
GeneralSimply Brilliant PinmemberKiaT25-Nov-06 18:00 
GeneralRe: Simply Brilliant PinmemberMarcos Meli8-Nov-06 3:12 
GeneralNice Work [modified] Pinmembergrep222-Jul-06 10:14 
GeneralRe: Nice Work PinmemberMarcos Meli22-Jul-06 10:26 
GeneralRe: Nice Work Pinmembernkxiawu3-Oct-06 17:41 
QuestionHow to auto change the text color? Pinmemberyazoox27-Mar-06 19:27 
AnswerRe: How to auto change the text color? PinmemberMarcos Meli28-Mar-06 3:57 
GeneralFantastic! Pinmemberverosystems24-Mar-06 7:55 
GeneralRe: Fantastic! PinmemberMarcos Meli24-Mar-06 11:45 
QuestionChanging the Start Position PinmemberJonathan Merriweather28-Feb-06 3:43 
AnswerRe: Changing the Start Position PinmemberMarcos Meli24-Mar-06 11:42 
GeneralRe: Changing the Start Position PinmemberJonathan Merriweather24-Mar-06 19:56 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150414.1 | Last Updated 20 Jan 2015
Article Copyright 2005 by Marcos Meli
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid