C#窗体程序,怎么做等待处理用的层和进度条
展开全部
private void Form1_Load(object sender, EventArgs e)
{
Thread thread = new Thread(threadFrom);//创建新线程
thread.Start();
/***开始加载任务**/
/***结束时销毁线程***/
thread .Abort();
}
public void threadFrom()
{
MethodInvoker MethInvo = new MethodInvoker(ShowForm2);
BeginInvoke(MethInvo);
}
public void ShowForm()
{
Form2 f2 = new Form2();
f2.Show();
}
{
Thread thread = new Thread(threadFrom);//创建新线程
thread.Start();
/***开始加载任务**/
/***结束时销毁线程***/
thread .Abort();
}
public void threadFrom()
{
MethodInvoker MethInvo = new MethodInvoker(ShowForm2);
BeginInvoke(MethInvo);
}
public void ShowForm()
{
Form2 f2 = new Form2();
f2.Show();
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询