在窗口的OnKeyDown事件中写代码.检测到Alt + F4 忽略他

解决方案 »

  1.   

    在Form的OnClose事件中加上
    if MessageDlg('Close application ?', mtConfirmation,
        [mbYes, mbNo], 0) = mrYes then
        Action := caFree
      else
        Action := caNone;
      

  2.   

    ??
    不行
    TO Linux2001(猪!是怎么死的)  lovewangj(lllll) (  )
    试一式RegisterServiceProcess( GetCurrentProcessID, 1 );
      

  3.   

    在窗口的OnKeyDown事件中写代码.检测到F4 忽略他
    if Key = vk_F4 then Key := 0;记得设置窗口的Keypreview属性为True