Ciao Alka!
In effetti mi sembra complicato,... nel frattempo sono arrivata a questo codice:
codice:
procedure TCatasticoForm.ImageCatasticoMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if button=mbleft then
ImageCatastico.autosize:=false;
imageCatastico.Height:=imageCatastico.Height+trunc(imageCatastico.Height*1);
imageCatastico.Width:=imageCatastico.Width+trunc(imageCatastico.Width*1);
ScrollBox1.HorzScrollBar.Range:=imageCatastico.picture.Width+trunc(imageCatastico.Width*1) ;
scrollbox1.vertscrollbar.range:=imageCatastico.Picture.Height+trunc(imageCatastico.Height*1);
if button=mbright then
ImageCatastico.autosize:=true;
scrollbox1.autosize:=true;
end;
L'inconveniente è che tornando indietro con lo zoom la scrollbox non si ridimensiona come l'immagine ma rimane più grande(a meno che non prema due volte di seguito il button ds del mouse)(?)