不是用的dbimage,用image做控件数组显示.

解决方案 »

  1.   

    把你的DBImage放在一个Panel上。读取图片的大小DBImage.Picture.width和Height
    with DBImage.Picture do
    begin
      if (width/Height)>=(Panel.Width/Panel.Height) then
      begin
           DBImage.Height:=Trunc(Panel.width*Height/Width);
           DBImage.width:=Panel.width;
      end
      else
      begin
           DBImage.width:=Trunc(Panel.Height*width/Height);
           DBImage.Height:=Panel.Height;
      end;
    end;DBImage的Stretch属性设为True。 无论什么图片都按比例缩放。
      

  2.   

    Image也一样啊,别忘了确定相对于Panel的Image的左上角的坐标。
      

  3.   

    建议如果你是做类似ACDSee的浏览器 建议不要放Panel ,把用户区计算成网格,图片相对与网格放置。否则太浪费资源(尽管98和2000对资源的限制已经很松)。