Answers for "insert a shape in delphi"

0

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;
Posted by: Guest on November-07-2020

Browse Popular Code Answers by Language