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 为当前窗口客户区捉图: getformimage

Delphi xe2 将域名转ip

Delphi调用程序版本信息的方法

Delphi的tservice的windows�入桌面切�q

Delphi 获取文件大小方法

Delphi输入汉字自动产生拼音简码

Delphi发送邮件―中文显示为乱码解决

Delphi 给 tcombobox 添加图标

Delphi 链接获取主站地址

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



打赏

取消

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

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

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

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

评论

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