给窗口法WM_NCHITTEST消息就可以实现你的要求

解决方案 »

  1.   

    最小化:Application.Minimized;
    最大化:Form.WindowState := wsMaximized;
    移动:
    private
       procedure WMNCHitTest(var Msg: TWMNCHitTest); message wm_NCHitTest;procedure TForm1.WMNCHitTest(var Msg:TWMNCHitTest);
    begin
      inherited;
      if (htClient = Msg.Result) then Msg.Result := htCaption;
    end;
      

  2.   

    最小化:Application.Minimize;
    最大化:Form.WindowState := wsMaximized;
    移动:
    private
       procedure WMNCHitTest(var Msg: TWMNCHitTest); message wm_NCHitTest;procedure TForm1.WMNCHitTest(var Msg:TWMNCHitTest);
    begin
      inherited;
      if (htClient = Msg.Result) then Msg.Result := htCaption;
    end;