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

Percent Progress Bar

0.00/5 (No votes)
6 Jan 2006 1  
A project and source code for a progress bar with percentage completed shown.

Introduction

When I first started programming, maybe about two years ago, I was disappointed to see that library code for a simple matter of having a progress bar with the percent complete inscribed in the middle, was nowhere to be found. Maybe, I am the only one who wants to have it, but I decided to make one of my own to figure out how to do it, and just for kicks.

Background

I had no idea where to start, so I checked out MSDN, and lo and behold, they had an article on how to make a progress bar control. So I used that source to create the basic control, then spent about an hour figuring out how to calculate the percent and show it in the middle of the custom bar. Sounds easy enough, eh? It took a bit, since it was my first control, but now it works.

Using the code

This is not that hard to use at all. Add it to your toolbox (Tools-> Add/Remove Toolbox Items-> Browse-> my DLL) and plop it on your form. Acts like a normal progress bar should, it just tells you how close it is to being done. Then you just use it however you like. I got the code to separate my properties from the normal .NET properties, from: A Smooth ProgressBar for everyone! Part Duex.

Points of Interest

This is a great project to look at if you are interested in learning how to create a custom control. All the code is commented, so it should not be hard to understand :-).

History

  • v 1.0 - Beginning stuff, more to come later.

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