小弟新手第一次接触到进度条控件progressBar,有高手指点下怎么用吗,听说要用到TIMER控件线程操作,但不知道具体该怎么弄,希望有段源代码看看...
解决方案 »
- Windows服务打印,使用CreateProcessAsUser 为什么会句柄无效?
- 我想写一个不受表中字段多少影响的方法,无论表中字段是增加还是减少都不影响方法的使用
- StreamWriter sw = new StreamWriter(@"\text.txt",true, System.Text.Encoding.Unicode);相对路径好像不能使用?
- 散分题
- 我2年前就考出了Oracle中级的证书,现在想读oracle高级可一直没找到,大家都是在哪读的oracle高级啊?
- 如何解决duandas控件纵坐标的title为中文时字体倒立的问题?(还可加分)
- 有江门的朋友吗(C#的)
- vs2005中的一个急手问题,那位老大帮帮忙啊!?
- windows server 2003 如何?
- 为什么总是出现这样的问题?
- Cookie票据无法永久保存
- 用C#代码如何取消"注销"功能...就是CTRL+ALT+DEL键里的菜单那个...详细问题进来看看
{
// Sets the progress bar's Maximum property to
// the total number of records to be created.
progressBar1.Maximum = 20; // Creates a new record in the dataset.
// NOTE: The code below will not compile, it merely
// illustrates how the progress bar would be used.
CustomerRow anyRow = DatasetName.ExistingTable.NewRow();
anyRow.FirstName = "Stephen";
anyRow.LastName = "James";
ExistingTable.Rows.Add(anyRow); // Increases the value displayed by the progress bar.
progressBar1.Value += 1;
// Updates the label to show that a record was read.
label1.Text = "Records Read = " + progressBar1.Value.ToString();
}
进度是由value 控制
pb.value = 50 ;
Progressdownload.Maximum = 1000
function bb
{
for(i=0;i<1000;i++)
{
Progressdownload.Value += 1
}
}
启用一个新线程调用这个函数