if not MyThread.Terminated then
     { ... }
  else { ... };

解决方案 »

  1.   

    Terminated属性是只读的,create(false)后为真
      

  2.   

    用 TThread.WaitFor 方法可以知道。但是它的缺点就是:
    WaitFor doesn't return until the thread terminates, so the thread must exit either by finishing the Execute method
    如果不想等待太长可以:
    if WaitForSingleObject(Thread.Handle, 200)=WAIT_OBJECT_0 then
     // Thread 结束以上前提是 TThread.FreeOnTerminate := False; 否则你可以设置 OnTerminate 方法,在新指向的方法里将 Thread := nil; 然后用 if Thread=nil then 判断.
      

  3.   

    用 TThread.WaitFor 方法可以知道。但是它的缺点就是:
    WaitFor doesn't return until the thread terminates, so the thread must exit either by finishing the Execute method
    如果不想等待太长可以:
    if WaitForSingleObject(Thread.Handle, 200)=WAIT_OBJECT_0 then
     // Thread 结束以上前提是 TThread.FreeOnTerminate := False; 否则你可以设置 OnTerminate 方法,在新指向的方法里将 Thread := nil; 然后用 if Thread=nil then 判断.
      

  4.   

    http://www.csdn.net/Expert/topic/508/508450.shtm
    帮帮忙
      

  5.   

    用 TThread.WaitFor 方法可以知道。但是它的缺点就是:
    WaitFor doesn't return until the thread terminates, so the thread must exit either by finishing the Execute method
    如果不想等待太长可以:
    if WaitForSingleObject(Thread.Handle, 200)=WAIT_OBJECT_0 then
     // Thread 结束以上前提是 TThread.FreeOnTerminate := False; 否则你可以设置 OnTerminate 方法,在新指向的方法里将 Thread := nil; 然后用 if Thread=nil then 判断.