views:

129

answers:

1

Hey guys,

How can I drag a file into a textbox, and then it will show the directory of that file. It seems pretty simple, since its a drag and drop kind of thing.

Thanks

A: 

You should have a look at this msdn article http://msdn.microsoft.com/en-us/library/aa289508%28VS.71,loband%29.aspx

it explains what you need to do to enable drag & drop

Here is an example of what you need to do on my blog:

http://www.antiyes.com/vb-drag-drop-files

John Boker
it shows you how to enable drag and drop, but it doesn't show how to display the directory of that file.
Kevin
Under the dragging files section of that document it shows you how to get the files that have been dropped. That should be enough to get the file paths.
John Boker
If I'm working with the Textbox part of the that document, since it tells me to use two textboxes, how would I do this with one?
Kevin
see http://www.antiyes.com/vb-drag-drop-files
John Boker