$event:=FORM Event:C1606

$picturesize:=600

Case of 
	: ($event.code=On Scroll:K2:57)
		OBJECT GET SCROLL POSITION:C1114(*; "Input"; $scrollv; $scrollh)
		Form:C1466.scrollv:=$scrollv
		Form:C1466.scrollh:=$scrollh
		PICTURE PROPERTIES:C457(Form:C1466.picture1; $width; $height)
		If ($width>$picturesize) & ($height>$picturesize)
			$rate1:=$scrollh/($width-$picturesize)
			$rate2:=$scrollv/($height-$picturesize)
			
			PICTURE PROPERTIES:C457(Form:C1466.thumbnail1; $thumbwidth; $thumbheight)
			OBJECT GET COORDINATES:C663(*; "Rectangle"; $l; $t; $r; $b)
			$thumbscrollh:=($thumbwidth-($r-$l))*$rate1
			$thumbscrollv:=($thumbheight-($b-$t))*$rate2
			OBJECT SET COORDINATES:C1248(*; "Rectangle"; 714+$thumbscrollh; 58+$thumbscrollv; 714+($r-$l)+$thumbscrollh; 58+($b-$t)+$thumbscrollv)
		End if 
End case 