The following program will teach you how to make a form that will constantly shake on the screen once it is run.
Define two variables:
var
BackLeft,BackTop,I:integer;
//Save the left of the form
BackLeft:= Left;
//Save the top of the form
BackTop := Top;
//The number can be set by you as a flexible number. Of course, the value is determined by you.
for I:=1 toNumber do
begin
//Horizontal jitter
Left:= (BackLeft-10) + (Random(20));
//vertical jitter
Top := (BackTop-10) + (Random(20));
end;
//Back up the left of the form
Left := BackLeft;
//Back up the top of the form
Top := BackTop;