how to make a shape move in delphi code example
Example: how to make a shape move in delphi
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case Key of
VK_UP:
Shape1.Top := Shape1.Top - 10;
VK_DOWN:
Shape1.Top := Shape1.Top + 10;
VK_LEFT:
Shape1.Left := Shape1.Left - 10;
VK_RIGHT:
Shape1.Left := Shape1.Left + 10;
end;
end;