procedure TRealWinPicF.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var Vx,Vy:Integer;//x,y位移。 begin Self.Caption:='x:'+IntToStr(x)+' Y:'+inttostr(y); if MoveFlag then begin Vx:=x-startpos.X; Vy:=y-startpos.Y; ScrollBox1.HorzScrollBar.Position:=ScrollBox1.HorzScrollBar.Position-Vx*(Image1.Width div ScrollBox1.HorzScrollBar.Range); ScrollBox1.VertScrollBar.Position:=ScrollBox1.VertScrollBar.Position-Vy*(Image1.Height div ScrollBox1.VertScrollBar.Range); end; end;