private void carlisle_DragOver(object sender, DragEventArgs e) { if (droppable_file) { e.Effect = DragDropEffects.Copy; return; } Point p = this.panel1.PointToClient(new Point(e.X, e.Y)); int local_x = p.X + Math.Abs(this.panel1.AutoScrollPosition.X); int local_y = p.Y + Math.Abs(this.panel1.AutoScrollPosition.Y); //form.MC.set_text("over!" + local_x + ":" + local_y + ":" + this.drag_x + ":" + this.drag_y + "\n"); if (droppable_icon && Start.insert(null, local_x, local_y, 0)) { e.Effect = DragDropEffects.Copy | DragDropEffects.Scroll; } else if (this.have_drag) { if (!this.have_cut_drag && ( Math.Abs(local_x - this.drag_x) > 5 || Math.Abs(local_y - this.drag_y) > 5)) //if (!this.have_cut_drag) { //form.MC.set_text("cut:" + this.drag_x + ":" + this.drag_y + "\n"); form.Cut_Click(sender, e); this.have_cut_drag = true; } if (Start.insert(null, p.X + Math.Abs(this.panel1.AutoScrollPosition.X), p.Y + Math.Abs(this.panel1.AutoScrollPosition.Y), 0)) { e.Effect = DragDropEffects.Move; } else { // was none e.Effect = DragDropEffects.Link; } } else { // was none e.Effect = DragDropEffects.Link; } }