Drop ListView Item into explorer folder

Posted on 2004-11-04
Last Modified: 2010-04-05
Hi, I have made a simple ftp client, and i would to add to my application Drag & drop capabilities. I have made with success a function for drop files from explorer to a listview, so i can upload a file or a folder in this way. But, for download functions, I must drag a file or a folder from a listview(in the listview i have the file list on ftp server) to the windows explorer (on the desktop for example), outside of my application window.

I can't find a valid and simple code to do this

Can anyone help me ? :-(
Question by:enumaelis
    LVL 33

    Accepted Solution

    hello  enumaelis, , as far as I can tell, there may not be a "Simple" way to code this, to do Shell Drag and Drop, I think you will need to do the shell Interfaces for Drag and Drop, not an easy thing to do correctly. . . I have used a Drag and drop component to do this sort of thing, you can find some good Drag and drop components at Torry web page -

    I have used the   "Drag and Drop Component Suite v.3.7"   with good results, but there are several others there also

    Author Comment

    Hi, thanks for your answer :-)

    I have already seen the "Drag and Drop Component Suite" (version 4), but I had some difficulties on use it, because the component that provides the drop function to Explorer wants as parameter an exsisting file on the disk, and so it can move this file to the destination. But if I drag an item from a listview (the remote file list) obviously I receive an error, because the component does'nt find the source file. It seems that there isn't a method to obtain from component, after the drop, the destination folder where I released the mouse button (so i could execute download in that folder).

    Any idea ?
    LVL 33

    Expert Comment

    I can not understand what you are saying about the thing you want to do? ?  ?
    If you want to use the "Shell" drag and drop for a File, then  I think (from what I know about it) that you will NEED an existing source file, that is accessible from a existing Disk,  when you do a Shell drag and drop, it tells the Recieving window that something has been dropped on that window, so you must initialize your Drag with the data that is being dragged, If you are dragging a File, then you set the Drag data to a File path and name, I know that the interface tells the drag sender some information about the drop destination, but I am not sure if that would help you,

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    This video discusses moving either the default database or any database to a new volume.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now