应该在onReSize里就可以控制吧;

解决方案 »

  1.   

    FormResize()定义maxheight和maxwidth吧。
      

  2.   

    可以详细一点吗?
    我好像找不到form有maxheight这个属性啊。
      

  3.   

    使用过DELPHI的朋友都会注意到DELPHI本身最上面的窗口,
    当它极大时只占屏幕的一小部分,它是如何实现的呢,请看下面的说明:
    1)在FORM私有声明部分加上如下一行:
    procedure WMGetMinMaxInfo( var Message:TWMGetMinMaxInfo ); message WM_GETMINMAXINFO; 
    2)在声明部分加上如下几行:
    procedure TForm1.WMGetMinMaxInfo( var Message :TWMGetMinMaxInfo );
    begin
    with Message.MinMaxInfo^ do
    begin
    ptMaxSize.X := 200; {最大化时宽度}
    ptMaxSize.Y := 200; {最大化时高度}
    ptMaxPosition.X := 99; {最大化时左上角横坐标}ptMaxPosition.Y := 99; {最大化时左上角纵坐标}
    end;
    Message.Result := 0; {告诉Windows你改变了 minmaxinfo}
    inherited; 
    end;
    /////////////////////////////////////////////
    unit getminmax;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
      TForm1 = class(TForm)
      private
        { Private declarations }
        procedure WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
                  message WM_GETMINMAXINFO;
        procedure WMInitMenuPopup(var Msg: TWMInitMenuPopup);
                  message WM_INITMENUPOPUP;
        procedure WMNCHitTest(var Msg: TWMNCHitTest);              message WM_NCHitTest;
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM} procedure TForm1.WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
     begin
         inherited;
         with Msg.MinMaxInfo^ do
         begin
              ptMinTrackSize.x:= form1.width;
              ptMaxTrackSize.x:= form1.width;
              ptMinTrackSize.y:= form1.height;
              ptMaxTrackSize.y:= form1.height;
         end;
     end; procedure TForm1.WMInitMenuPopup(var Msg: TWMInitMenuPopup); begin
          inherited;
          if Msg.SystemMenu then
             EnableMenuItem(Msg.MenuPopup, SC_SIZE, MF_BYCOMMAND or MF_GRAYED)
     end; procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest);
     begin
          inherited;
          with Msg do
               if Result in [HTLEFT, HTRIGHT, HTBOTTOM, HTBOTTOMRIGHT,
                         HTBOTTOMLEFT, HTTOP, HTTOPRIGHT, HTTOPLEFT] then
                  Result:= HTNOWHERE
     end;
    end.  { End of Unit}
    未经证实葵花宝典里的内容,应该可以满足你的需求吧。
      

  4.   

    直接在form的属性里面设置就可以了具体什么名忘了反正前面有加号的点开后里面有4项maxheight maxwidth mixheight mixwidth设置后点最大化的时候就是你指定的最大高度和宽度
      

  5.   

    Constraints.MaxHeight
      Constraints.MaxWidth
      Constraints.MinHeight
      Constraints.MinWidth
      

  6.   

    没有那么复杂,同意zswang(伴水)(* 嘻 *)
      

  7.   

    在窗体上放个什么控件,然后设置 Form1-》AotoSize=True;就可以了