25.12.2008, 17:40
|
Активный
|
|
Регистрация: 15.07.2008
Сообщения: 260
Репутация: 23
|
|
Во первых тебе нужно переделать процедуру Timer1Timer вот код:
Код:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if (not Moving) then exit
else
begin
DrawShape(Point(Round(OldPTop.X + iArr * dx), Round(OldPTop.Y + iArr * dy)),
Point(Round(OldPBottom.X + iArr * dx), Round(OldPBottom.Y + iArr * dy)),
pmNotXor, clBlack);
Inc(iArr);
DrawShape(Point(Round(OldPTop.X + iArr * dx), Round(OldPTop.Y + iArr * dy)),
Point(Round(OldPBottom.X + iArr * dx), Round(OldPBottom.Y + iArr * dy)),
pmNotXor, clBlack);
if iArr >= Delta then
begin
Moving:= false;
with StringGrid1 do
begin
DrawShape(Point(Round(OldPBottom.X + Delta * dx), Round(OldPBottom.Y + Delta * dy)),
Point(StrToInt(Cells[1, 1]), StrToInt(Cells[2, 1])),
pmNotXor, clBlack);
DrawShape(Point(Round(OldPTop.X + Delta * dx), Round(OldPTop.Y + Delta * dy)),
Point(StrToInt(Cells[3, 1]), StrToInt(Cells[4, 1])),
pmNotXor, clBlack);
end;
Timer1.Enabled:= false;
end;
end;
А во вторых указанный коментарий можешь убрать, это следы моей работы
|