public void Progress(string phase, int StepValue)
{
  DeleProgress deleProgress = new DeleProgress(privateProgress);
  if (InvokeRequired == true)
  {     Invoke(deleProgress, phase, StepValue);   //程序有时走到这里就会卡住,有时就是好的
   }
   else
   {
     deleProgress(phase, StepValue);
   }
}这个方法是供使用者调用的一个方法。请问下invoke方法那句是有什么问题吗?请大神分析下。

解决方案 »

  1.   

    跟踪 privateProgress ,为什么卡
      

  2.   

    请问下,您的意思是,invoke()卡住的原因是委托的方法卡住了吗?
      

  3.   


    请问下,您的意思是,invoke()卡住的原因是委托的方法卡住了吗?
      

  4.   

    单步调试的时候,卡到那一步了,没错误。
    换成BeginInvoke不卡了,但是UI还是卡住了。