Application.terminate能作为一个事件对它写码么?比如showmessage('123')...

解决方案 »

  1.   

    Application.terminate是一个方法,不是事件。
    看你的意思是想在程序退出时弹出一个showmessage。
    你可以在主窗口的OnClose事件中写showmessage('123')。
    delphi在主窗口的OnClose事件之后,就会执行Application.Terminate来关闭整个程序。
      

  2.   

    在Application.terminate之前触发showmessage('123')不就可以了
      

  3.   

    执行 Application.Terminate 后, OnDestroy 中的代码还会执行, 但不会理会 OnCloseQuery、OnClose 中的代码了.
      

  4.   

    Application.terminate;  //只是一种关闭程序的方法
    showmessage('123');  //显示信息之间没有任何关系的,所以只能这个写代码
    showmessage('123');
    Application.terminate; 
      

  5.   

    看你的要做什么,真要在Application.terminate中处理,就进源码改一下,源码也就一句代码而已