You put the DragEnter event on the wrong control, you must use the panel s. I think I know how you got into this trouble, ListView doesn t have any event that indicates the user started dragging an item. You ll need to synthesize that yourself. The basic approach is to record the mouse down position and use the MouseMove event to check if the user has moved the mouse far enough to start a drag. Like this:
private Point dragMousePos;
private void listView1_MouseDown(object sender, MouseEventArgs e) {
if (e.Button == MouseButtons.Left) dragMousePos = e.Location;
}
private void listView1_MouseMove(object sender, MouseEventArgs e) {
if (e.Button == MouseButtons.Left) {
int dx = Math.Abs(e.X - dragMousePos.X);
int dy = Math.Abs(e.Y - dragMousePos.Y);
if (dx >= SystemInformation.DoubleClickSize.Width ||
dy >= SystemInformation.DoubleClickSize.Height) {
var item = listView1.GetItemAt(dragMousePos.X, dragMousePos.Y);
if (item != null) listView1.DoDragDrop(item, DragDropEffects.Move);
}
}
}