using System;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Random rnd = new Random();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Color c = Color.FromArgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255));
SolidBrush brush = new SolidBrush(c);
Graphics graphics;
graphics = this.CreateGraphics();
graphics.FillEllipse(brush, new Rectangle(50, 50, 200, 300));
brush.Color = Color.FromArgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255));
graphics.FillEllipse(brush, new Rectangle(70, 70, 300, 200));
brush.Dispose();
graphics.Dispose();
}
}
}