Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Advanced Progressbar

0.00/5 (No votes)
24 Jan 2006 1  
An extended progress bar with support for shape based progress bars and 3D colors.

Advanced Progressbar sample

Advanced Progressbar sample

Introduction

This article explains an extended progress bar with support for shape based progress bars and 3D colors.

Background

The first version only included a basic rectangle progress bar with "3D" abilities and percent display. I decided to add a dynamic shape function so it could be used with any shape (you can add more shapes in the CreateRegion function).

Using the code

Just place it on the form and have a look at the properties:

  • FillingMethod - the direction of the gradient (right to left, left to right..).
  • GradientMethod - the way the gradient is drawn (Horizontal, Vertical, 3D).
  • Shape - the shape of the progress bar (rectangle, ellipse, rounded rectangle, triangle, magen david, snake).

Other stuff you should have a look at are: BorderSize, BorderDisplay, and PercentDisplay.

Points of Interest

Good progress bars are easy to find today, but I wrote this one because I didn't find one that I liked that supported percents display, and the rest is history.

History

The first version only included a simple rectangle progress bar and was written very specifically for rectangle. Later, I wanted to add one more style, and I decided to write it dynamically for any shape. This is an updated version fixed for .NET 2.0.

License

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