I am using the following code.
Why is it not working properly?
private void Form1_Shown(object sender, EventArgs e) { for (int i = 1; i <= 100; i++) { Application.DoEvents(); Thread.Sleep(200); progressBar1.Refresh(); progressBar1.Value = i; progressBar1.CreateGraphics().DrawString(i.ToString() + "%", new Font("Arial", (float)8.25, FontStyle.Regular), Brushes.Black, new PointF(progressBar1.Width / 2 - 10, progressBar1.Height / 2 - 7)); } }
update:
Why is the text not always displayed?
c # progress-bar
jack rasha Nov 24 '11 at 15:08 2011-11-24 15:08
source share