procedure TForm1.Button1Click(Sender: TObject); begin randomize; panel1.caption:=inttostr(1+Random(49)); end;