Hola
Estás utilizando la propiedad Color del Form.
Cuando haces esto:
En realidad estás haciendo ésto:
Código Delphi
[-] Form1.Color := random(7);
Para que eso no te suceda debes de utilizar una variable como te muestro a continuación
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
var
colorTmp: Integer;
begin
colorTmp := random(7);
case ( colorTmp ) of
1 : shape1.brush.color:=clred;
2 : shape1.brush.color:=$000080FF;
3 : shape1.brush.color:=clyellow;
4 : shape1.brush.color:=clLime;
5 : shape1.brush.color:=clgreen;
6 : shape1.brush.color:=clBlue;
7 : shape1.brush.color:=clnavy;
end;
end;
Saludos