title: Set a Panel Location to Mouse Position
body: <p>I'm having a problem, I want set a panel Location to Mouse Pos. Everything was "fine" but this happens:</p>
  
  <p><a href="https://i.stack.imgur.com/KdnMZ.gif" rel="nofollow noreferrer">https://i.stack.imgur.com/KdnMZ.gif</a></p>
  
  <p>I want the panel location to be at the center of the mouse. How I can fix it? I'm using Visual Studio. My code:</p>
  
  <pre class="lang-c prettyprint-override"><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Diagnostics;
  using System.Drawing;
  using System.Linq;
  using System.Runtime.CompilerServices;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace Blocker
  {
      public partial class Form1 : Form
      {
  
          Panel Selection_Box = new Panel();
  
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
  
              Selection_Box.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
              Selection_Box.Location = System.Windows.Forms.Control.MousePosition;
              Selection_Box.BackColor = Color.FromArgb(0, 159, 227);
              Selection_Box.Size = new Size(70, 70);
              Selection_Box.Name = "Selection_Box";
              this.Controls.Add(Selection_Box);
  
          }
  
          private void Form_MouseMove(object sender, MouseEventArgs e) 
          {
  
              Selection_Box.Location = System.Windows.Forms.Control.MousePosition;
  
          }
  
      }
  }
  </code></pre>