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;
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;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货