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
.Update(). This can result in low performance and sometimes these don't work.
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:
You can set the
GradientStyle property to obtain some of these styles:
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.
- 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.
- Vertical ProgressBar (not only horizontal)
- Text align
- Border color
Visit my page Marcos Meli and come back with updates soon.