1:          public Form1()
   2:          {
   3:              InitializeComponent();
   4:              this.Show();
   5:              Graphics grp = this.CreateGraphics();
   6:              Pen p = new Pen(Color.Black, 2);
   7:              grp.DrawLine(p, new Point(0, 0), new Point(100, 100));
   8:              grp.DrawEllipse(p,20,20,100,80);
   9:              //draw ellipse according responding rectangle.
  10:              grp.DrawRectangle(p, 20, 20, 100, 80);
  11:   
  12:          }