Resolved Drag&Drop

Status
Not open for further replies.

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
ok, i get the concept of drag & drop and i've gotten all the examples i've found on this topic to work, i like the flexibility but what i'd like to know is when a file from the filesystem is dropped onto the form, i'd like to be able to know what file it is and where (drive:\path\name.ext) so i can open it with a streamreader (this is just a text file) any idea's ? any articles?
 

tschoepi

Member
Joined
May 20, 2010
Messages
6
Location
Germany
Programming Experience
10+
Hi JuggaloBrotha,

in the event DragDrop you can check with e.Data.GetDataPresent("FileName") if there is a file dropped onto your form. With e.Data.GetData("FileName") you then can get the filename(s).

Hope, this will help

Markus
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,553
Location
Norway
Programming Experience
10+
Status
Not open for further replies.
Top Bottom