同意楼上,在程序内写上inherited

解决方案 »

  1.   

    参考这个例子:
    在private中:
        procedure WMSysCommand(var wMessage: TWMSysCommand); message WM_SysCommand;在implementation中:
    procedure TForm1.WMSysCommand(var wMessage: TWMSysCommand);
    begin
      if wmessage.CmdType = SC_MINIMIZE then //拦截最小化消息
      begin
         Form1.Visible:=false;//进行自己的处理,此处为隐藏窗体代替最小化
      end  else
      begin
        inherited;//若不是最小化消息,则执行应该执行的操作
      end;
    end;应该很容易理解了吧! :)