Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 15868, How to accept dropped files from the explorer

by Pablo Reyes Email: Anonymous

How to accept dropped files from the explorer.
This way you can drag and drop files to a specific control in a Delphi form.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 4.0  to 5.0 856 downloads
Copyright: Open Source or other

Size: 3,056 bytes
Updated on Fri, 20 Apr 2001 12:05:54 GMT
Originally uploaded on Thu, 19 Apr 2001 13:17:23 GMT
SHA1 Hash: 77283A668C56DFECCD1F10002B7EFFE3E01F052D
MD5 Hash: 3311EE3DF939D2E0F7A7D9CDAECC278F

    Explore the files in this upload

By responding to WM_DROPFILES message we can accept dropped file from explorer. We can do that telling windows which window will accept dropped files using DragAcceptFiles API function. This function accepts two parameters: first parameter is the handle of the window and second parameter enable or disable accepting dropped files. If we use the form handle as the first parameter we can handle WM_DROPFILES message in the standard way, as any other windows message inside a form. But if we use a ListBox handle (or something like that) as the first parameter we need te replace WindowProc method of ListBox with a method that handle WM_DROPFILES message.
This way, for example, we can put two ListBox in a Form and drop files to each one.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03