点什么窗体都最小化

private
    procedure WMSysCommand(var Msg:TMessage);message WM_SYSCOMMAND;

 

procedure TFormMain.WMSysCommand(var Msg: TMessage);
begin
  case Msg.WParam of
    SC_CLOSE,SC_MINIMIZE,SC_MAXIMIZE:
    begin
      Application.Minimize;
    end;
  else inherited;
  end;
end;

posted @ 2008-11-12 21:06  delphi中间件  阅读(152)  评论(0编辑  收藏  举报