Click here to Skip to main content
Click here to Skip to main content

Never-ending Progress Bar (C#)

, 1 Oct 2004 CPOL
Rate this:
Please Sign up or sign in to vote.
The VB.NET Never-ending Progressbar now in C#

Sample Image - OSProgress.png


Sometimes you just don’t know how long something will take. Like when your wife says she’ll only be a few minutes in the grocery store…you know what I mean.

The standard ProgressBar that ships with Visual Studio is great for when you know how long something will take, or there is a way to determine just how many steps a process will have. But like the trip to the store with your wife, sometimes you just can’t know how long something’s going to take. That’s why I created this progress bar.

More Information

For more information, please see for the original article and VB.NET source.


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


About the Author

Greg Osborne

United States United States
Visual Basic Developer since version 1.0
Java web developer
Currently developing in vb and c#

Comments and Discussions

GeneralAwesome PinmemberJboy20130-Mar-07 8:12 
GeneralHmmmm Pinmembertayspen20-Nov-05 18:11 
GeneralRe: Hmmmm Pinmembertayspen30-Nov-05 10:18 
GeneralGreat control, but few idea's & Issue's PinmemberPriest Of Psi4-Oct-04 23:54 
GeneralRe: Great control, but few idea's & Issue's PinmemberGregOsborne5-Oct-04 5:39 
GeneralCan you post your sample working code!Re: Great control, but few idea's & Issue's PinmemberHaiyan Du2-May-08 6:00 
GeneralRe: Can you post your sample working code!Re: Great control, but few idea's & Issue's PinmemberHaiyan Du2-May-08 7:22 
I finished this task with the System.ComponentModel.BackgroundWorker
You have progressbar which autoprogress set to true and visible set to false.
when user start the program, no one will see this progress bar. when user click a button, this progress bar visible is set to true and we call SpineUp() now.
Big Grin | :-D Big Grin | :-D
here is my code:
private System.ComponentModel.BackgroundWorker _backThread;
public Form1()
_backThread=new System.ComponentModel.BackgroundWorker();
this._backThread.DoWork += new System.ComponentModel.DoWorkEventHandler(this.ProcessNumbersBackgroundWorker_DoWork);
this._backThread.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.ProcessNumbersBackgroundWorker_RunWorkerCompleted);


private void ProcessNumbersBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
//Do your work here
private void ProcessNumbersBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
MessageBox.Show("Done background work!");

private void button4_Click(object sender, EventArgs e)


private void SpineUp()


Haiyan DU

GeneralRe: Great control, but few idea's & Issue's PinmemberGregOsborne5-Oct-04 5:49 
GeneralFlickering... and solution PinmemberLEXXa2-Oct-04 13:45 
GeneralRe: Flickering... and solution PinmemberGregOsborne4-Oct-04 5:31 
GeneralRe: Flickering... and solution Pinmemberpolyester16-Nov-04 11:49 
GeneralRe: Flickering... and solution PinmemberGregOsborne16-Nov-04 11:55 
GeneralRe: Flickering... and solution Pinmemberpolyester17-Nov-04 8:07 
GeneralGreat! but... PinmemberCurtis W2-Oct-04 12:24 
GeneralRe: Great! but... PinmemberGregOsborne4-Oct-04 5:29 
GeneralRe: Great! but... PinmemberCurtis W4-Oct-04 17:00 
GeneralRe: Great! but... PinsussAnonymous4-Oct-04 17:55 
GeneralRefreshing Problem + Workaround PinmemberOrcrist1-Oct-04 12:25 
GeneralRe: Refreshing Problem + Workaround PinmemberGregOsborne1-Oct-04 12:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141220.1 | Last Updated 1 Oct 2004
Article Copyright 2004 by Greg Osborne
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid