G
Guest
We are attempting to allow our users to use Drag n Drop onto a control in a
WinForms v2 application.
Within the control_DragDrop() event handler we want to determine the name
and location for a file that was dropped onto this control. We are
moderately familiar with performing DnD from within our application - we do
this between various controls within the app itself - but, a lot to learn
when it comes to DnD and external files from outside our application.
We are successfully determining that the user is trying to drop a file onto
the control with the following code in the DragEnter() event handler:
if (e.Data.GetDataPresent( DataFormats.FileDrop ))
{
Console.WriteLine("A file was dropped .......");
}
What we're trying to do now, is create a File object (or something similar
that you might recommend) using the file the user has dropped so that we can
get to its contents, file name, date it was created, etc., etc. Just not
sure how to get the handle to the file??
Thanks
WinForms v2 application.
Within the control_DragDrop() event handler we want to determine the name
and location for a file that was dropped onto this control. We are
moderately familiar with performing DnD from within our application - we do
this between various controls within the app itself - but, a lot to learn
when it comes to DnD and external files from outside our application.
We are successfully determining that the user is trying to drop a file onto
the control with the following code in the DragEnter() event handler:
if (e.Data.GetDataPresent( DataFormats.FileDrop ))
{
Console.WriteLine("A file was dropped .......");
}
What we're trying to do now, is create a File object (or something similar
that you might recommend) using the file the user has dropped so that we can
get to its contents, file name, date it was created, etc., etc. Just not
sure how to get the handle to the file??
Thanks