Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between DragDropEffects.Copy and DragDropEffects.Move?

I have looked all over the internet for an answer to this question and I cannot seem to find it.

What's the difference between DragDropEffects.Copy and DragDropEffects.Move?

In my code on the DragEnter I set it to:

private void Canvas_DragEnter(object sender, DragEventArgs e)
    {
        if (e.Data.GetDataPresent(DataFormats.FileDrop))
            e.Effect = DragDropEffects.Move;
    }

But if I use

private void Canvas_DragEnter(object sender, DragEventArgs e)
    {
        if (e.Data.GetDataPresent(DataFormats.FileDrop))
            e.Effect = DragDropEffects.Copy;
    }

There is no difference in the program.

Could someone please explain the difference?

like image 694
ρσݥzση Avatar asked May 28 '12 18:05

ρσݥzση


2 Answers

They provide different mouse cursors, if you have Allow Drop enabled on the target.

like image 94
John Koerner Avatar answered Sep 25 '22 18:09

John Koerner


The only difference is the cursor, the user can tell from the cursor appearance whether your program will do a move or a copy. The copy cursor has a +, the move cursor doesn't.

But it is up to you to actually implement it that way.

like image 42
Hans Passant Avatar answered Sep 25 '22 18:09

Hans Passant