------------------------------------
With Borland Delphi
------------------------------------
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Form1.Color := TRUNC(RANDOM * clRed);
end;
------------------------------------
With Visual Basic
------------------------------------
Dim Red, Green, Blue As Integer
Private Sub Timer1_Timer()
Red = Int(Rnd * 255)
Green = Int(Rnd * 255)
Blue = Int(Rnd * 255)
Form1.BackColor = RGB(Red, Green, Blue)
End Sub