title: C# draw problems
body: <p>I have a problem when I try to draw a rectangle or something on the screen. In this code I will expect to draw a rectangle on the coordinate x = 0 and y = half of the screen, but it isn't in the center of the screen.</p>
  
  <p>Thank you !</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          private Graphics gr;
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Paint(object sender, PaintEventArgs e)
          {
              gr = this.CreateGraphics();
  
              Pen p = new Pen(new SolidBrush(Color.Black),1);
  
              gr.DrawRectangle(p, 0, this.Height / 2 - 50, 100, 100);
          }
      }
  }
  </code></pre>