是不是在onresize中改变控件的top,left,width,height等属性呢?

解决方案 »

  1.   

    onresize
      判断当前的窗口状态
     if common then
      //些你最大化后的控件的width and height
     if maxsize then 
      //写入恢复原状时component width and height
      

  2.   

    把窗体里面的各控件的Anchors属性的四个都设置为True。如果只想左固定,就只设置alLeft为True,以此类推
      

  3.   

    还有一个问题,就是要求OnResize中的代码必须在窗体最大时才执行怎么才能实现呢?
      

  4.   

    procedure TForm1.FormResize(Sender: TObject);
    begin
      if Self.WindowState <> wsMaximized then
        Exit;
      // ...
    end;