drag drop from explorer

I want to accept drag drop files from explorer so I got as fara s
DragOver(object sender, DragEventArgs e)

Now the Control.DragOver Event help says
// Determine whether string data exists in the drop data. If not, then
// the drop effect reflects that the drop cannot occur.
if (!e.Data.GetDataPresent(typeof(System.String))) {


But how do I do files? It's not String and not IO.File
[442 byte] By [FoodBard] at [2007-11-19 22:35:08]
# 1 Re: drag drop from explorer
the check willbe
if( e.Data.GetDataPresent(DataFormats.FileDrop, false) == true )
then get the files into an array
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
aniskhan at 2007-11-9 11:22:38 >
# 2 Re: drag drop from explorer
Isee. Also, what is the diff DragEnter vs DragOver ?
FoodBard at 2007-11-9 11:23:38 >
# 3 Re: drag drop from explorer
If the user moves out of a window, the DragLeave event is raised.

If the mouse enters another control, the DragEnter for that control is raised.

If the mouse moves but stays within the same control, the DragOver event is raised.
aniskhan at 2007-11-9 11:24:47 >
# 4 Re: drag drop from explorer
I guess then DragOver fires many times, should I use DragEnter + DragLeave instead? But I remember some progs that don't fix cursors properly, prolly cuz they didn't get a DragLeave event.
FoodBard at 2007-11-9 11:25:41 >
# 5 Re: drag drop from explorer
The DragOver is used so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position.
aniskhan at 2007-11-9 11:26:40 >