title: very simple program to draw a filled rectangle .. why it does not work ?
body: <p>I am new with using graphics and I am trying to draw a filled rectangle when the form opens.. but nothing is working and do not know the reason </p>
  
  <p>here is my code : </p>
  
  <pre><code>private void Result_Load(object sender, EventArgs e)
  {
      System.Drawing.SolidBrush myBrush = new       System.Drawing.SolidBrush(System.Drawing.Color.Green);
      System.Drawing.Graphics formGraphics = this.CreateGraphics();
      formGraphics.FillRectangle(myBrush, new Rectangle(0, 0, 200,300));
      myBrush.Dispose();
      formGraphics.Dispose();
  }
  </code></pre>
  
  <p>where Result is my form that is supposed I draw the rectangle on when it is loaded </p>
  
  <p>but when I load the form nothing happens at all </p>
  
  <p>where the problem ?</p>
  
  <p>thanks in advance </p>