delphi 图像自动调整显示


本文整理自网络,侵删。

 var 
  TempWidth: longint; 
begin 
  Image1.AutoSize := false; 
  Image1.Stretch := true; 
  if ((Image1.Picture.Width * ClientHeight) div 
    Image1.Picture.Height) > ClientWidth then 
  begin 
    Image1.Width := ClientWidth; 
    Image1.Height := (Image1.Picture.Height * ClientWidth) div 
      Image1.Picture.Width; 
  end 
  else 
  begin 
    Image1.Height := ClientHeight; 
    Image1.Width := (Image1.Picture.Width * ClientHeight) div 
      Image1.Picture.Height; 
  end; 

相关阅读 >>

Delphi判断文件夹(目录)是否存在,不存在就创建一个

Delphi中webbrowser的用法

Delphi分离汉字和英文字母

Delphi如何获取硬盘所有的分区容量

Delphi dectobinstr

Delphi 中判断windows系统是否是64位系统

Delphi xe10 fdmemtable 数据保存本地和从本地加载

Delphi可执行程序参数

Delphi tstrings 过滤空行

Delphi xe中泛型数组的使用范例

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...