我的程序是在1024*768下写的,结果在600*800下窗体控件都变大了,出了一堆滚动条,请问怎么解决呀?多谢了
以前的答复好像解决不了啊,每次运行程序前改变显示器分辨率不好吧
大家写程序都是怎么做的呀?

解决方案 »

  1.   

    你这样在MAINFORM中,先取得现有的分辨率,in FormShow中改现在的分辨率,在ONCLOSE中把原先的恢复了
      

  2.   

    form的字体:宋体,采用国标
    form scaled属性:=false试试吧,不过肯定不如1024*768的漂亮。
      

  3.   

    找的不知道你用的上不咯
    假设你在800*600的分辨率下设计的form,第一步:
    inplementation
    const
      ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
      ScreenHeight: LongInt = 600;{$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;
      

  4.   

    用 timelyraining(恨天) 的方法就可以了。
      

  5.   

    我的程序里没有对窗体做任何特殊的处理,只是每个窗体create时设置了width、height