本文整理自网络,侵删。
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 为当前窗口客户区捉图: getformimage
Delphi的tservice的windows�入桌面切�q
更多相关阅读请进入《Delphi》频道 >>