【C# 进度条 】 progressBar

 1         private void button1_Click(object sender, EventArgs e)

 2         {

 3             progressBar1.Minimum = 0;

 4             progressBar1.Maximum = 600;

 5 

 6             m_time0 = new Timer();

 7             m_time0.Interval = 100;

 8             m_time0.Tick += new EventHandler(time_Tick);

 9 

10             m_time0.Start();

11         }

12 

13         private void time_Tick(object sender, EventArgs e)

14         {

15             if (++ progressBar1.Value >= 600)

16             {

17                 progressBar1.Value = 0;

18             } 

19         }

 

 

 

你可能感兴趣的:(ProgressBar)