我new了一个子线程, 这个线程是一个类的方法,Test test1 = new Test();
Thread thread = new Thread(new ThreadStart(test1.testAtiny1));
thread.Start();
再在子线程调用form上的控件让它显示,但是没有反应,可能是不能访问UI主线程的关系,还是其他什么问题呢?form2.labelHour.Text = totalSpan.TotalHours.ToString("F0");
Application.DoEvents();
form2.labelMinute.Text = totalSpan.Minutes.ToString();
Application.DoEvents();
form2.labelSecond.Text = totalSpan.Seconds.ToString();
Application.DoEvents();
你子线程用了while吗?有没有休眠?
子线程用了while,有一句:Thread.Sleep(1);