请问各位,怎么样屏蔽一些快捷建,比如alt+f4什么的??

解决方案 »

  1.   

    type
      TForm1 = class(TForm)
      private
        { Private declarations }
        procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
      end;procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);
    begin
      if Msg.CmdType <> SC_CLOSE then
        inherited
    end;
      

  2.   

    在KEYPRESS事件中处理..这个是最烂的方法..
    楼上的比较好..
      

  3.   

    procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      if (key=VK_F4) and ([ssALT]=shift) then
        key:=0;
      if (key=VK_F12) and ([ssALT]=shift) then
        close;
    end;