[Solved] Delphi, How to make a shape stop moving
Try the following code (assign OnCreate and OnPaint of the form and set the timer to 30 millisecond intervals): unit Unit5; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls; type TVector = record X, Y: real; end; TForm5 = class(TForm) Timer1: TTimer; procedure FormPaint(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); … Read more