2015-07-21 118 views
0

我正在开发Windows窗体应用程序,我需要使用圆形进度栏。我做了一些研究,发现这个Circular Progress Bar Package,但我没有得到这项工作,是否有人知道如何使用它,或任何其他方式创建一个圆形的进度栏?Windows窗体中的圆形进度条

+5

你看过开发者在他的GitHub源代码中提供的演示吗? https://github.com/falahati/CircularProgress –

+0

如果你能告诉我控制库的确切问题,我可能会帮助或至少让其他人更容易。但无论如何,看看新版本。 –

回答

1

如果你不想使用外部库,你可以在图片框中使用动画gif。进度可以通过简单的标签显示在中心。它肯定不是最漂亮的,但它能很好地完成工作,而且它是win8风格。

+0

谢谢,我做到了,它的工作完美 –

0
  int i; 

      progressBar1.Minimum = 0; 
      progressBar1.Maximum = 200; 

      for (i = 0; i <= 200; i++) 
      { 
       progressBar1.Value = i; 
      } 
      //------------------------------------- 

      this.circularProgress1.Value = 100; 
      this.circularProgress2.Value = 0; 

      this.timer1.Interval = 1; 
      this.timer1.Enabled = true; 
     } 

     private void timer1_Tick(object sender, EventArgs e) 
     { 
      if (this.circularProgress1.Value > 0) 
      { 
       this.circularProgress1.Value--; 
       this.circularProgress2.Value++; 
      } 
      else 
      { 
       this.timer1.Enabled = false; 
      } 
     } 
    } 
}