为什么我terminate之后  程序的进程还是存在的。。

解决方案 »

  1.   

    证明你的主线程很繁忙,来不及响应。
    实际上Application.Terminate调用的是PostQuitMessage,MSDN上有说明如下:The PostQuitMessage function posts a WM_QUIT message to the thread's message queue and returns immediately; the function simply indicates to the system that the thread is requesting to quit at some time in the future. When the thread retrieves the WM_QUIT message from its message queue, it should exit its message loop and return control to the system. The exit value returned to the system must be the wParam parameter of the WM_QUIT message. 
      

  2.   

    要强制退出,调用ExitProcess(0);
      

  3.   

    的确,有时候发现Terminate,Halt都不能退出程序
      

  4.   

    SendMessage(Self.Handle,WM_CLose,0,0);退出不了就是你程序有严重的Bug