当前位置: 编程技术>.net/c#/asp.net
c#进度条ProgressBar学习笔记
来源: 互联网 发布时间:2014-08-30
本文导语: 对于进度条,无碍乎是最小最大值,以及当前值等一些重要的属性,至于方法,用得较多的是PerformStep()和PerformClick()之类的。 代码如下,没有注释,大家凑和看吧。 private void btnRun_Click(object sender, EventArgs e) { btnRun.Enabled...
对于进度条,无碍乎是最小最大值,以及当前值等一些重要的属性,至于方法,用得较多的是PerformStep()和PerformClick()之类的。
代码如下,没有注释,大家凑和看吧。
private void btnRun_Click(object sender, EventArgs e) { btnRun.Enabled = false; if (txtBoxTarget.Text.Equals(String.Empty) || txtBoxTimes.Text.Equals(String.Empty)) { MessageBox.Show("请输入连接的URL和连接次数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } int length = Int32.Parse(txtBoxTimes.Text.Trim()); string url = txtBoxTarget.Text.Trim(); double process = 0; int show = 0; DateTime rightNow = DateTime.Now; DateTime end; TimeSpan interval; toolStripStatusLabel.Text = "连接中"; progressBar.Visible = true; progressBar.Minimum = 0; progressBar.Maximum = length; for (int i = 1; i
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
站内导航:
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!