当前位置: 移动技术网 > IT编程>开发语言>.net > C# winform 程序进度条

C# winform 程序进度条

2020年03月31日  | 移动技术网IT编程  | 我要评论

一个月宝宝腹泻怎么办,和讯外汇论坛,亚宁男友杨健照片

控制条控件: progressbar

不能按照你程序的进程自动变化,需认为计算,调整变化量

 private void progressbar1_click(object sender, eventargs e)
        {
                this.progressbar1.maximum = 100;//设置进度条最大长度值
                this.progressbar1.value = 0;//设置当前值
        }
     

  progressbar1.invoke(new action(() => { this.progressbar1.value = 0; }));    //进度条初始化

 if (this.progressbar1.value < 45)
      {
                    progressbar1.invoke(new action(() => { this.progressbar1.value += 5; }));//改变进度条的值
        }

 progressbar1.invoke(new action(() => { this.progressbar1.value = this.progressbar1.maximum; }));  //进度条到达满值

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网