我有一个 ProgressBar 和一个计时器。
我想显示1小时的进度:每秒增加1/3600。
当我运行该应用程序时,30 分钟后,进度条的进度约为 100%。我预计30 分钟后会达到 50%。这是为什么?
public Form1()
{
InitializeComponent();
this.timer1.Tick += new EventHandler(timer1_Tick);
this.timer1.Interval = 1000;
this.timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
this.progressBar1.PerformStep();
}
-
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 29);
this.progressBar1.MarqueeAnimationSpeed = 1000;
this.progressBar1.Maximum = 3600;
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(100, 23);
this.progressBar1.Step = 1;
this.progressBar1.TabIndex = 2;