你的意思是程序运行过程中,始终让窗体保持同一大小?在TIMER事件里,加入——form1.height:=600;
form1.width:=800;timer的时间间隔设置为100(毫秒)

解决方案 »

  1.   

    在窗体的onresize事件里编程
      form1.height:=111;
      form1.width:=111;
      

  2.   

    1.响应Form的事件OnCanResize
    2.使用Form的属性Constraints
      

  3.   

    实际上在Tform里有这样的属性Constraints,
    只要分别设置它的四个参数值,即:
    MaxWidth,MaxHeigth,MinWidth,MinHeight
    那么窗体的大小便自动受限制了。
    祝你走运!
      

  4.   

    可以将Form的BorderStyle属性设为bsSingle,窗体则不能重设大小。
      

  5.   

    修改SYSTEMMENU属性和FORMSTYLE属性就可以了
      

  6.   

    myxxyy与hlbl11的方法最实在、简单
      

  7.   

    procedure tform1.canresize(sender:tobject;canSize:boolean);
    begin
      cansize:=false;
    end;
      

  8.   

    有个消息!
    WM_WINDOWPOSCHANGE
      

  9.   

    下面是如何控制Form的最大化的时候的大小,共你参考:(1)方法
    type
    TForm1 = class(TForm)
      private
        procedure _WM_GETMINMAXINFO(var mmInfo : TWMGETMINMAXINFO ); message wm_GetMinMaxInfo;
    end;procedure TForm1._WM_GETMINMAXINFO(var mmInfo : TWMGETMINMAXINFO );
    begin
      // set the position and the size of your form when maximized:
      with mmInfo.minmaxinfo^ do
      begin
        ptmaxposition.x := Screen.Width div 4;
        ptmaxposition.y := Screen.Height div 4;
        ptmaxsize.x := Screen.Width div 2;
        ptmaxsize.y := Screen.Height div 2;
      end;
    end;(2)About wm_GetMinMaxInfo Message
      The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size. 
    (3)About TMINMAXINFO structure
      The MINMAXINFO structure contains information about a window's maximized size and position and its minimum and maximum tracking size. It's defined as:
    typedef struct tagMINMAXINFO { // mmi 
       POINT ptReserved; 
       POINT ptMaxSize;     //Specifies the maximized width (point.x) and the maximized height (point.y) of the window. 
       POINT ptMaxPosition;  //Specifies the position of the left side of the maximized window (point.x) and the position of the top of the maximized window (point.y).   
       POINT ptMinTrackSize;  //Specifies the minimum tracking width (point.x) and the minimum tracking height (point.y) of the window. 
       POINT ptMaxTrackSize;  //Specifies the maximum tracking width (point.x) and the maximum tracking height (point.y) of the window. 
    } MINMAXINFO;