title: get cursor position
body: <p>I have an <code>usercontrol</code> called TaskControl and a button for creating other <code>usercontrols</code> by dragging. I want the new user control that appears to be at the same coordinates where my cursor is. Below it is my code. It doesn't want to appear at those coordinates and the new <code>usercontrol</code> appears behind the old one. 
  My code:</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
      {
  
  
          Point localCoordinates = this.PointToClient(Cursor.Position);
          TaskControl t = new TaskControl();
          t.Location = new Point(Cursor.Position.X,Cursor.Position.Y);
          t.MouseDown += new MouseEventHandler(t_MouseDown);
          t.MouseMove += new MouseEventHandler(t_MouseMove);
          t.MouseUp += new MouseEventHandler(t_MouseUp);
  
          this.Controls.Add(t);
      } 
  </code></pre>