First, be aware you are not using the WinForms Drag/Drop facility that has some sophisticated features for giving feedback while dragging, etc.
See if you get some ideas from this example, which like yours, is using a simple method
using System;
using System.Windows.Forms;
namespace YourNameSpace
{
public partial class ToolBoxPanel : UserControl
{
public ToolBoxPanel()
{
InitializeComponent();
}
private void ToolBoxPanel_Load(object sender, EventArgs e)
{
parent = this.Parent as Form;
}
private PictureBox currentPB;
private bool IsMouseUp = true;
private CheckBox cb;
private int cbCount = 0;
private Form parent;
private void pictureBox_MouseDown(object sender, MouseEventArgs e)
{
currentPB = sender as PictureBox;
switch (currentPB.Name)
{
case "pictureBox1":
cb = new CheckBox();
parent.Controls.Add(cb);
cb.Text = "CheckBox " + cbCount++;
cb.Show();
cb.BringToFront();
break;
}
IsMouseUp = false;
}
private void pictureBox_MouseUp(object sender, MouseEventArgs e)
{
IsMouseUp = true;
if(this.DisplayRectangle.Contains
(this.PointToClient
(currentPB.PointToScreen(e.Location))))
{
parent.Controls.Remove(cb);
cb.Dispose();
}
}
private void pictureBox_MouseMove(object sender, MouseEventArgs e)
{
if (IsMouseUp) return;
cb.Location = parent.PointToClient(this.PointToScreen(e.Location));
}
}
}
Note: the moved Control in this example is not movable once it has been sited on the parent Form.