Hi Guys,
I wrote some simple code on having a progress bar. But i wish to do some enhancement. Its currently working as i want but i would appreciate if this two things can be completed as well.
1) Having the percentage in the progress bar itself. I mean each time it loops, the percentage which is placed in progress bar (acts as an indicator) increases as well..I dont want to place a label in progress bar, just wondering
weather is the any property in progress bar that allows me to provide indicator in percentage
2) By default, the progress bar is showing grey color, can i change it to green or something to make it look more appealing
I wrote some simple code on having a progress bar. But i wish to do some enhancement. Its currently working as i want but i would appreciate if this two things can be completed as well.
1) Having the percentage in the progress bar itself. I mean each time it loops, the percentage which is placed in progress bar (acts as an indicator) increases as well..I dont want to place a label in progress bar, just wondering
weather is the any property in progress bar that allows me to provide indicator in percentage
2) By default, the progress bar is showing grey color, can i change it to green or something to make it look more appealing
Code:
int TotalRecords = 25000; //Initialized to 25000 arbitrarily
progressBar1.Step = 500;
progressBar1.Minimum = 1;
progressBar1.Maximum = TotalRecords-1;
for(int y = 0; y<TotalRecords; y++)
{
if (progressBar1.Value < progressBar1.Maximum)
{
progressBar1.Value += progressBar1.Minimum;
Application.DoEvents();
}
}
MessageBox.Show ("Done");