如题?

解决方案 »

  1.   

    inplementation
    const
      ScreenWidth: LongInt = 1024; {I designed my form in 1024×768 mode.}
      ScreenHeight: LongInt = 768;{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
    begin
      scaled := true;
      if (screen.width <> ScreenWidth) then
      begin
        height := longint(height) * longint(screen.height) div ScreenHeight;
        width := longint(width) * longint(screen.width) div ScreenWidth;
        scaleBy(screen.width, ScreenWidth);
      end;
    end;下一步,要每個子控制的字体改變到合适的大小:
    type
      TFooClass = class(TControl); { needed to get at protected }
                                   { font property }var
      i: integer;
    begin
      for i := ControlCount - 1 downto 0 do
        TFooClass(Controls[i]).Font.Size :=
            (NewFormWidth div OldFormWidth) *
            TFooClass(Controls[i]).Font.Size;
    end;
      

  2.   

    大哥,小弟才学,有点看不懂你的代码,能不能再具体一点?假设我有一个panel,button,label,具体代码怎么写?
      

  3.   

    for i:=0 to self.ComponentCount-1 do
      if self.Components[i] is TButton then
        (Components[i] as TButton).Width := (Components[i] as TButton).Width +10;这样就把所有的Button的Width都加了10,用这种方法一类一类的处理就可以了
      

  4.   

    下载OBControl控件装上就行了,里面的TOBAutoSizeCompo控件就能实现你要的功能,很简单的,只要设该控件的Active :=true或false就行了,连字体都能跟着变.要是找不到就留个邮箱我发给你
      

  5.   

    请给一份,[email protected]  谢了.
      

  6.   

    fengzsz(班沙克) :
    [email protected]
    我也要。谢谢
    这个控键能在D2006中用吗?
      

  7.   

    这个控件我找了很久都没找到,发份给我吧~~~先谢过~~~
    [email protected]
      

  8.   

    我也要一份
    [email protected]
    谢谢