本文整理自网络,侵删。
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 xe增强的rtti妙用--动态创建包中的窗口类
如何使用Delphi 10 seattle的android应用做intent的发送和接收
Delphi unigi unidbtreegrid展开叠起 unidbgrid自动调节列宽
Delphi tcxgrid的tcxgriddbtableview.viewdata.rows跟records有什么区别
更多相关阅读请进入《Delphi》频道 >>