C#为标准的进度条控件增加百份比显示

int percent = (int)(((double)progressBar1.Value / (double)progressBar1.Maximum) * 100);
progressBar1.CreateGraphics().DrawString(percent.ToString() + "%",
              new Font("Arial", (float)8.25, FontStyle.Regular),
              Brushes.Black, new PointF(progressBar1.Width / 2 - 10,
              progressBar1.Height / 2 - 7));


你可能感兴趣的:(C#为标准的进度条控件增加百份比显示)