nbsp;Image1.Top:=(Panel1.Height-Image1.Height) div 2; Image1.Left:=(Panel1.Width-Image1.Width) div 2; end else begin Image1.Width:=Panel1.Width; Image1.Height:=Image1.Width*Image1.Picture.Bitmap.Height div Image1.Picture.Bitmap.Width; Image1.Top:=(Panel1.Height-Image1.Height) div 2; Image1.Left:=(Panel1.Width-Image1.Width) div 2; end; end else begin Image1.AutoSize:=false; Image1.Stretch:=true; if Image1.Picture.Bitmap.Height>=Image1.Picture.Bitmap.Width then begin Image1.Height:=Panel1.Height; Image1.Width:=Image1.Height*Image1.Picture.Bitmap.Width div Image1.Picture.Bitmap.Height; Image1.Top:=(Panel1.Height-Image1.Height) div 2; Image1.Left:=(Panel1.Width-Image1.Width) div 2; end else begin Image1.Width:=Panel1.Height; Image1.Height:=Image1.Width*Image1.Picture.Bitmap.Height div Image1.Picture.Bitmap.Width; Image1.Top:=(Panel1.Height-Image1.Height) div 2; Image1.Left:=(Panel1.Width-Image1.Width) div 2; end end; Image1.Visible:=true; end;