I
icehill
Unregistered / Unconfirmed
GUEST, unregistred user!
{--------------------------------Move the picture------------------------------------------}
procedure TForm_3011.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MouseDown.x:=x;
MouseDown.y:=y;
Capture:=true;
end;
{--------------------------------Move the picture----------------------------------------}
procedure TForm_3011.Image1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
if Capture then
begin
so.HorzScrollBar.Position := so.HorzScrollBar.Position+trunc((X-MouseDown.x)/20);
so.VertScrollBar.Position := so.VertScrollBar.Position+trunc((Y-MouseDown.y)/20);
end;
end;
{-------------------------------Move the picture-----------------------------------------}
procedure TForm_3011.Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Capture then
begin
Capture:=false;
so.HorzScrollBar.Position := so.HorzScrollBar.Position+trunc((X-MouseDown.x)/20);
so.VertScrollBar.Position := so.VertScrollBar.Position+trunc((Y-MouseDown.y)/20);
end;
end;
{------------------------------------------------------------------------}
procedure TForm_3011.BitBtn1Click(Sender: TObject);
begin
Image1.AutoSize:=false;
Image1.Stretch:=true;
Image1.Height:=trunc(Image1.Height*2/3);
Image1.Width:=trunc(Image1.Width*2/3);
end;
{----------------------------------------------------------------------}
procedure TForm_3011.BitBtn2Click(Sender: TObject);
begin
Image1.AutoSize:=false;
Image1.Stretch:=true;
Image1.Height:=trunc(Image1.Height*3/2);
Image1.Width:=trunc(Image1.Width*3/2);
end;
procedure TForm_3011.FormActivate(Sender: TObject);
begin
so.DoubleBuffered:=true;
end;
procedure TForm_3011.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MouseDown.x:=x;
MouseDown.y:=y;
Capture:=true;
end;
{--------------------------------Move the picture----------------------------------------}
procedure TForm_3011.Image1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
if Capture then
begin
so.HorzScrollBar.Position := so.HorzScrollBar.Position+trunc((X-MouseDown.x)/20);
so.VertScrollBar.Position := so.VertScrollBar.Position+trunc((Y-MouseDown.y)/20);
end;
end;
{-------------------------------Move the picture-----------------------------------------}
procedure TForm_3011.Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Capture then
begin
Capture:=false;
so.HorzScrollBar.Position := so.HorzScrollBar.Position+trunc((X-MouseDown.x)/20);
so.VertScrollBar.Position := so.VertScrollBar.Position+trunc((Y-MouseDown.y)/20);
end;
end;
{------------------------------------------------------------------------}
procedure TForm_3011.BitBtn1Click(Sender: TObject);
begin
Image1.AutoSize:=false;
Image1.Stretch:=true;
Image1.Height:=trunc(Image1.Height*2/3);
Image1.Width:=trunc(Image1.Width*2/3);
end;
{----------------------------------------------------------------------}
procedure TForm_3011.BitBtn2Click(Sender: TObject);
begin
Image1.AutoSize:=false;
Image1.Stretch:=true;
Image1.Height:=trunc(Image1.Height*3/2);
Image1.Width:=trunc(Image1.Width*3/2);
end;
procedure TForm_3011.FormActivate(Sender: TObject);
begin
so.DoubleBuffered:=true;
end;