Click here to Skip to main content
12,813,994 members (31,777 online)
Click here to Skip to main content
Add your own
alternative version


72 bookmarked
Posted 24 Sep 2006

Status Label - Showing Progress

, 24 Sep 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
Show application progress via a status label.

Sample Image - ItemSelection.jpg

Designer Preview


Browsing the Internet, I was unable to find what I needed, and so decided to give it a crack myself. It does exactly what I wanted it to be capable of doing. However, I am still new to this, as such please excuse stupid errors and please give me constructive critism about the code and idea. Thank you!

Progress Bar

The problem with the ProgressBar is that I only knew when certain events had been triggered. Thus, the progress would pause in a position for a while and then suddenly jump, not giving a true representation of what was going on. I considered placing a label on the form that would update with the latest information. The issue here being that the user would have no indication as to how many steps were involved. Finally, the problem with this was 'cleanly' creating the labels and associated text for each task. Suffice to say, I wasn't happy with these ideas.


I decided I needed a reason to learn about Design-Time controls. Herein, this control was born. I decided that I wanted a control that could display the various tasks that needed to be accomplished, and basically tick them off as each task was completed. I also wanted to be able to display an image that would also show progress. The control has a few features, such as system drawn image (customizable colouring) when no image is present. Design time features include being able to add/delete status items straight in the editor, no coding necessary. It does what it's supposed to do, and definitely suits my application. Hopefully, this is useful for someone else too.

Control Usage

To begin using this control, it's as easy as doing the following. I will explain at the end!

Imports StatusLabel
Imports StatusLabel.StatusLabel
Imports StatusLabel.StatusItem

Public Class frmMain
   Inherits System.Windows.Forms.Form
   Dim Status As New StatusLabel.StatusLabel

   Private Sub AddItem()
      Dim si as new StatusItem

      si.Name = "Item1"
      si.Text = "Connecting"
      si.Status = CurrentStatus.None

   End Sub

   Private Sub RemoveItemByIndex(ByVal Index As Int16)
   End Sub

   Private Sub RemoveItemByItem(ByVal Item As StatusItem)
   End Sub

End Sub

End Class


The imports are mostly to make the code easier to input. A simple reference to the DLL would be sufficient.

I have ommitted the location, size, etc... code since this article is focused on the control itself and its usage.

You add an item much like any other collection (ComboBox, ListBox, etc...). Next, you assign the item some a name, text, and a status. The available modes are:

  • None - No icon is shown and the text is not indented
  • Pending - The pending icon is shown and the text is indented
  • Running - The pending icon is shown and the text is indented and bold
  • Complete - The complete icon is shown and the text is indented, not bold

Altering a property is simple, and can be done much like any other control. The same goes for removing. An example of changing the status:

Status.Items.Item(0).Status = CurrentStatus.Pending

An example of changing an icon (GIF, JPG, PNG, ICO are all supported):

Status.CompleteImage = Image.FromFile("Some_File.jpg")


  • GDI image displayed when no image available
  • Ellipsis (...) displayed automatically when status item is in running state
  • Customisable colours for box and tick
  • Tick and box can be replaced with images
  • Design-time support

Known Issues

Transparent images are supported, however if they are icons with a transparent colour, this colour will be shown. I wasn't able to work out how to fix this, if you know, please contact me and let me know.

Planned Updates

  • Support for transparent images
  • Text/image alignment
  • Autosizing
  • Design-time moving (up/down)
  • Progress bar inclusion showing total progress


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


About the Author

Software Developer uSoftware
Australia Australia
Shaps currently works as the Senior Networks Administrator for a small IT company in Australia. He is also involved in various software developments, for Windows, Windows Mobile, iPhone, Mac and occasionally the web. His central focus in this area, is User Interface design.

If he had spare time, he'd play some tunes, read a book or visit the gym. Until then, he writes small applications for the iPhone that help improve his productivity at work.

You may also be interested in...

Comments and Discussions

Generalgood Pin
Foamox24-Oct-08 19:45
memberFoamox24-Oct-08 19:45 
GeneralSetup at Runtime Pin
simohack4-Feb-07 22:02
membersimohack4-Feb-07 22:02 
GeneralVisual Basic 2003 Version Pin
dbaratelli11-Jan-07 3:43
memberdbaratelli11-Jan-07 3:43 
GeneralRe: Visual Basic 2003 Version Pin
Shahpour26-Jan-07 19:34
memberShahpour26-Jan-07 19:34 
GeneralAdding status Failed Pin
Brian G01283-Oct-06 6:09
memberBrian G01283-Oct-06 6:09 
GeneralRe: Adding status Failed Pin
shaps803-Oct-06 6:23
membershaps803-Oct-06 6:23 
AnswerRe: Adding status Failed Pin
SgtNerd6-Sep-07 1:06
memberSgtNerd6-Sep-07 1:06 

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
Web02 | 2.8.170308.1 | Last Updated 24 Sep 2006
Article Copyright 2006 by Shahpour
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid