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捕捉屏幕

DelphiDelphi提升进程权限为debug权限

Delphi webbrowser 表单赋值模拟点击

Delphi xe增强的rtti妙用--动态创建包中的窗口类

如何使用Delphi 10 seattle的android应用做intent的发送和接收

Delphi unigi unidbtreegrid展开叠起 unidbgrid自动调节列宽

Delphi 从 exe 或 dll 中获取图标的函数

Delphi 暴力保护进程

Delphi tcxgrid的tcxgriddbtableview.viewdata.rows跟records有什么区别

Delphi xe中 exit 的新用法

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



打赏

取消

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

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

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

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

评论

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