怎样屏蔽Alt+F4

解决方案 »

  1.   

    需要捕捉WM_SYSCOMMAND消息,然后作出判断。
    procedure WMSysCommand(var Msg: TMessage);
    begin
      if Msg.wParam <> SC_CLOSE then
        inherited;
    end;
      

  2.   

    借上面兄弟的话头具体点。
    public
    procedure WMSysCommand(var Msg: TMessage);WM_SYSCOMMAND;Implementationprocedure TForm1.WMSysCommand(var Msg: TMessage);
    begin
      if Msg.wParam <> SC_CLOSE then
        inherited;
    end;