You are on page 1of 1

using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void grafico(int xa, int ya)
{
Pen pl = new Pen(Color.Black);
int i;

Graphics gr = pictureBox1.CreateGraphics();
gr.Clear(Color.White);

for (i = 200; i >= 0; i = i - 20)


gr.DrawEllipse(pl, xa += 10, ya, i, 200);

for (i = 200; i >= 0; i = i - 20)


gr.DrawEllipse(pl, xa + 200, ya += 10, 200, i);

}
private void button1_Click(object sender, EventArgs e)
{
grafico(100,100);
}
}
}

You might also like