procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if not moveflag then exit;
    Scrollbox1.HorzScrollBar.Position :=Scrollbox1.HorzScrollBar.Position -(x-oldx);
    Scrollbox1.VertScrollBar.Position :=Scrollbox1.VertScrollBar.Position -(y-oldy);
    oldx:=x;
    oldy:=y;
end;procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 oldx:=x;
 oldy:=y;
 moveflag:=true;
end;procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  MoveFlag:=false;
end;