和应用程序的一样,都是用 your线程.Terminate

解决方案 »

  1.   

    在进程的Execute
    属性里 jincheng.terminate提示没有terminate属性
      

  2.   

    我这里的线程类就没有terminate属性  mydown1 = class(TThread)
      private
        { Private declarations }
      protected
      giveanswer1:string;
        procedure Execute; override;
        procedure giveanswer();
      end;
    mydown1.terminate,错误!根本无此属性
      

  3.   

    查一下帮助嘛
    ndicates whether the thread has been asked to terminate.property Terminated: Boolean;DescriptionThe thread's Execute method and any methods that Execute calls should check Terminated periodically and exit when it's True. The Terminate method sets the Terminated property to True.The Terminate method is the polite way to abort the execution of a thread, but it requires cooperation from the thread抯 Execute code. Using Terminate is recommended over the TerminateThread Win32 API call.
      

  4.   

    FreeOnTerminate

    Terminated

    Suspended
    我想是你程序的相关函数,查查文档
      

  5.   

    具体来讲,要在你的循环中写下一句:
    if Terminated=true then Break;
    在线程的开始,写:
    FreeOnTerminate:=True;
    一切就OK了
    当你需要终止线程的时候就用
    YourThread.Terminate