backgroundWorker
Thread thread = new Thread(new ThreadStart(fun));
thread.Start();private void fun()
{
Thread.CurrentThread.Abort();
} private void test(int value)
{
if (this.InvokeRequired)
{
this.Invoke(new ProgressBarShow(test), value);
}
else
{
this.progressBar1.Value = value;
this.label1.Text = value + "%";
}
}
Thread thread = new Thread(new ThreadStart(fun));
thread.Start();private void fun()
{
Thread.CurrentThread.Abort();
} private void test(int value)
{
if (this.InvokeRequired)
{
this.Invoke(new ProgressBarShow(test), value);
}
else
{
this.progressBar1.Value = value;
this.label1.Text = value + "%";
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货