我在1024*768下做的界面但到了800*600就不能完整显示了。怎么办啊?

解决方案 »

  1.   

    试试吧:
    implementation
      const
      ScreenWidth:LongInt=800;
      ScreenHeight:LongInt=600;
      {$ R*.DFM}
      procedure TMainForm.FormCreate(Sender:TObject);
      var
      OldFormWidth:integer;
      begin
      Scaled:=TRUE;
      if(Screen.width<> ScreenWidth)then
      begin
      OldFormWidth:=Width
      Height:=longint(Height)*longint(Screen.Height)DIV S creenHeight;
      Width:=longint(Width)*longint(Screen.Width)DIV Scre enWidth;
      ScaleBy(Screen.Width,ScreenWidth);
      Font.Size:=(Width DIV OldFormWidth)*FontSize;
      end;
      end;