Click here to Skip to main content
13,138,372 members (51,473 online)
Click here to Skip to main content
Add your own
alternative version


253 bookmarked
Posted 1 Oct 2005

Fully Customizable XP Progress Bar (with examples)

, 20 Jan 2015
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
Architect Devoo
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)

You may also be interested in...


Comments and Discussions

QuestionVertical orientation Pin
Ricky.B3-Jul-15 4:35
memberRicky.B3-Jul-15 4:35 
QuestionGreat control but... Pin
djmarcus28-Feb-15 10:31
memberdjmarcus28-Feb-15 10:31 
AnswerRe: Great control but... Pin
Ravi Bhavnani28-Feb-15 11:40
professionalRavi Bhavnani28-Feb-15 11:40 
GeneralRe: Great control but... Pin
djmarcus3-Mar-15 8:32
memberdjmarcus3-Mar-15 8:32 
QuestionVertical Bar Pin
chrispow4-Apr-14 14:38
memberchrispow4-Apr-14 14:38 
QuestionVertical Progressbar? Pin
keyur_patel23-Dec-13 21:29
memberkeyur_patel23-Dec-13 21:29 
Generalthank you Pin
auoks4-Jul-13 17:18
memberauoks4-Jul-13 17:18 
GeneralMy vote of 5 Pin
uiqq24-Sep-12 22:35
memberuiqq24-Sep-12 22:35 
QuestionThank you for a well laid out control Pin
PatMcHargue10-Aug-12 11:40
memberPatMcHargue10-Aug-12 11:40 
Questionthanks Pin
Don_Hard27-May-12 0:16
memberDon_Hard27-May-12 0:16 
GeneralMy vote of 5 Pin
Don_Hard27-May-12 0:15
memberDon_Hard27-May-12 0:15 
GeneralThanks very nice Pin
kazemtnt13-Jun-11 12:44
memberkazemtnt13-Jun-11 12:44 
GeneralMy vote of 5 Pin
GlimmerMan18-Dec-10 20:11
memberGlimmerMan18-Dec-10 20:11 
GeneralI am learning~~ Pin
fairy9898-Oct-10 19:39
memberfairy9898-Oct-10 19:39 
GeneralMy vote of 5 Pin
kingtouch13-Sep-10 1:00
memberkingtouch13-Sep-10 1:00 
GeneralVertical Progress BAR Pin
andrew_16612-Jun-08 1:45
memberandrew_16612-Jun-08 1:45 
Generalline on the progress Bar Pin
maornit6-Nov-07 4:04
membermaornit6-Nov-07 4:04 
Generalthanks Pin
ququer9-Sep-07 17:09
memberququer9-Sep-07 17:09 
Generalprogressbar on list view Pin
anu jaggi2-May-07 1:19
memberanu jaggi2-May-07 1:19 
GeneralTriggering the progressbar from backgroundworker Pin
UltraWhack19-Apr-07 8:35
memberUltraWhack19-Apr-07 8:35 
GeneralThanks ! Pin
wick9512-Apr-07 4:45
memberwick9512-Apr-07 4:45 
GeneralGood Job Pin
Jeffro Bodine7-Apr-07 5:30
memberJeffro Bodine7-Apr-07 5:30 
Selecters13-Mar-07 4:45
memberSelecters13-Mar-07 4:45 
GeneralRe: REALLY GREAT! Pin
Marcos Meli13-Mar-07 4:52
memberMarcos Meli13-Mar-07 4:52 
GeneralMagnificent submission Pin
Huntermonk8821-Feb-07 6:11
memberHuntermonk8821-Feb-07 6:11 
Generalpermission problems Pin
merrittholmes16-Feb-07 5:35
membermerrittholmes16-Feb-07 5:35 
GeneralCan't find Vertical ProgressBar (not only horizontal) Pin
silorenz30-Jan-07 23:54
membersilorenz30-Jan-07 23:54 
GeneralRe: Can't find Vertical ProgressBar (not only horizontal) Pin
Marcos Meli31-Jan-07 7:13
memberMarcos Meli31-Jan-07 7:13 
QuestionCan I Suggest a small improvement ? Pin
TheDarkMan26-Jan-07 1:03
memberTheDarkMan26-Jan-07 1:03 
AnswerRe: Can I Suggest a small improvement ? Pin
Marcos Meli26-Jan-07 2:53
memberMarcos Meli26-Jan-07 2:53 
GeneralRe: Can I Suggest a small improvement ? Pin
TheDarkMan29-Jan-07 20:49
memberTheDarkMan29-Jan-07 20:49 
GeneralThanks Pin
napo@burgasnet.com19-Jan-07 1:10
membernapo@burgasnet.com19-Jan-07 1:10 
GeneralRe: Thanks Pin
Marcos Meli19-Jan-07 2:15
memberMarcos Meli19-Jan-07 2:15 
GeneralMarquee mode Pin
roel_v20-Dec-06 18:01
memberroel_v20-Dec-06 18:01 
GeneralColorsXp Pin
LupineRanger20-Dec-06 2:16
memberLupineRanger20-Dec-06 2:16 
GeneralRe: ColorsXp Pin
Marcos Meli20-Dec-06 2:23
memberMarcos Meli20-Dec-06 2:23 
QuestionA great submission! Pin
minart3-Dec-06 23:59
memberminart3-Dec-06 23:59 
GeneralProblem with anchor property Pin
Morningkill6-Nov-06 4:48
memberMorningkill6-Nov-06 4:48 
GeneralRe: Problem with anchor property Pin
Bengie24-Feb-07 21:58
memberBengie24-Feb-07 21:58 
GeneralSimply Brilliant Pin
KiaT25-Nov-06 17:00
memberKiaT25-Nov-06 17:00 
GeneralRe: Simply Brilliant Pin
Marcos Meli8-Nov-06 2:12
memberMarcos Meli8-Nov-06 2:12 
GeneralNice Work [modified] Pin
grep222-Jul-06 9:14
membergrep222-Jul-06 9:14 
GeneralRe: Nice Work Pin
Marcos Meli22-Jul-06 9:26
memberMarcos Meli22-Jul-06 9:26 
GeneralRe: Nice Work Pin
nkxiawu3-Oct-06 16:41
membernkxiawu3-Oct-06 16:41 
QuestionHow to auto change the text color? Pin
yazoox27-Mar-06 18:27
memberyazoox27-Mar-06 18:27 
AnswerRe: How to auto change the text color? Pin
Marcos Meli28-Mar-06 2:57
memberMarcos Meli28-Mar-06 2:57 
GeneralFantastic! Pin
verosystems24-Mar-06 6:55
memberverosystems24-Mar-06 6:55 
GeneralRe: Fantastic! Pin
Marcos Meli24-Mar-06 10:45
memberMarcos Meli24-Mar-06 10:45 
QuestionChanging the Start Position Pin
Jonathan Merriweather28-Feb-06 2:43
memberJonathan Merriweather28-Feb-06 2:43 
AnswerRe: Changing the Start Position Pin
Marcos Meli24-Mar-06 10:42
memberMarcos Meli24-Mar-06 10:42 

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
Web04 | 2.8.170915.1 | Last Updated 20 Jan 2015
Article Copyright 2005 by Marcos Meli
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid