本帖最后由 caozhy 于 2012-01-01 20:24:00 编辑

解决方案 »

  1.   

    NewThread.Suspend(), Resume() 的方法早就废弃了。另外,直接去看看 Task 把,用线程池的线程比你自己直接Thread要好
      

  2.   

    请问: 
        .net 是不是不支持 Suspend(), Resume()了?
    为什么,上面的没有返应?
       你说线程池,与我 new Thread() 方法开劈的线程,有何不同?
      

  3.   

    问题可能出在from2.ShowProgress方法,
      

  4.   

    我把 form2 贴出来,
    麻凡 帮看看!
    public partial class Form2 : Form
    {
    public Form2()
    {
    InitializeComponent();
    }
    private int value;
    public int Value {
    get { return value; }
    set { value = Value; }
    }
    private void Form2_Load(object sender, EventArgs e)
    {
    value = 50;
    }
    public void ShowProgress()
    {

    progressBar1.Value = value;

    }
    private Timer tim;
    private void btnInVal_Click(object sender, EventArgs e)
    {
    progressBar1.Value = 0;
    if (tim == null)
    {
    tim = new Timer();
    tim.Interval = 50;
    tim.Tick += new EventHandler(timTick);
    }
    tim.Start();
    }
    private void timTick(object sender, EventArgs e)
    {
    if (progressBar1.Value < 100)
    {
    progressBar1.Value++;
    }
    else
    {
    progressBar1.Value = 0;
    tim.Stop();
    }
    }
    }
      

  5.   

    关于 Thread 问题,看看这个链接吧。http://www.albahari.com/threading/Thread 暂停,继续的帖子也很多,再搜搜