Go Back   FlashFXP Forums > >

Project: FlashFXP Feature Requests Ticket Tools
ID: 652 Category: User Interface
Title: Better drag and drop support Status: Closed (Fixed / Implemented)
Severity: Major Version: 4.x

Junior Member
mrphuzz
02-07-2012, 07:00 AM
Better drag and drop support

Hello,

The good: Just want to say I love this program... it's been one of my favorite internet-related purchases ever.

The bad: To many, this wouldn't be a "Major Severity," but it is to me because it is such a staple of the Windows UI: being able to drag-drop from the application to Windows Explorer. That has been my only complaint with FlashFXP. It's very frustrating when I instinctively try to do this and end up with the "non" symbol... I would LOVE LOVE LOVE to be able to drag a remote file from the FlashFXP UI to my desktop (or wherever).
FlashFXP Developer
bigstar
03-15-2012, 08:23 AM
Re: Better drag and drop support

I would love to support this, however I do not see any way to support this type of behavior without creating a windows shell extension drag/drop hook.

When you drop a file on an external window the source of the drop (flashfxp) isn't provided with the actual location of where the drop occurred.
Junior Member
Toffe
03-22-2012, 07:14 AM
Re: Better drag and drop support

There is an interesting twist on this in the bottom of this thread. This is C#, but the technique should be applicable in any language.
http://social.msdn.microsoft.com/For...f-3c97dcef7583

Also here, one guy had this idea that you could check x, y when doing the drag event handler, if it is outside your form make the path the systems desktop (that would at least support desktop drop). I think that angle of the problem could open up a lot of possibilities. Perhaps together with working with temporary stored files.

http://www.daniweb.com/software-deve...ndows-explorer

I think in the end of that thread there is another interesting solution.

Here they work with temporary copies and stuff:
http://social.msdn.microsoft.com/for...-0421a6378b47/


I know drag and drop is a tricky story. I just solved my first bits of it in a server applet made in C#. So I have all respect for the fact that it might be too much work.


Also, I just checked and realized that Filezilla support this. The sourcecode of Filezilla is open, so maybe we could snoop around and see if there might be a valid solution to the problem there.
Junior Member
Toffe
03-22-2012, 07:16 AM
Re: Better drag and drop support

http://svn.filezilla-project.org/fil...src/interface/

Here there are a few source files called dndobjects and dragdropmanager. This is in c++, but still it might be a place to start dig for information about how they solved it.
Junior Member
mrphuzz
05-10-2012, 09:26 PM
Re: Better drag and drop support

Wow, I forgot about this feature request. First, I'm not sure why creating a drag-drop handler is a bad thing...

However, I will throw this into the mixer. I write applications using VB (I know, I know...). I figured out a workaround for use in that language and it seems to work well. I am not sure how to apply in C or whatever other languages, but here is the basic concept (this being taken from my own notes almost 3 years ago):

* The following techniques are used to accomplish this task: ShellFileOps to use the recycle bin, ShellNotify to be alerted when files are created in the filesystem, and GetTempFileName() to create a temporary file (which is recycled, not left behind).
* Populate the listview with whatever it is you need.
* Drag a listitem to the desktop (or any other explorer window/location).
* When the drag operation starts, set the AllowedEffects to vbDropEffectCopy.
* When the drag operation enters an explorer location, create a temp file and add it to the Data.Files() object.
* When you complete your drag operation, the temp file is moved from it's current location in the temp folder to where you dropped the list item in explorer. This is handled automatically because of AllowedEffects.
* ShellNotify will grab the temp file's new location.
* Whala! You now know where you dragged your listitem to.
* Cleanup: Use ShellFileOps to send the temp file to the recycle bin with permanent delete and no dialog.
* After that, do whatever you need to do with the DroppedFolder location!

I don't know if you have access to VB6, but if you do, here is a link to my code:
http://www.planet-source-code.com/vb...72074&lngWId=1

(lol, I just noticed how in the screenshot at the above site I mentioned an FTP client being a use for this example... but this was 3 years ago, so it's pure coincidence!)

Anyway, for me, this is a kinda a big issue just because it's so "natural" in a modern Windows environment, and I often find myself forgetting that this isn't a capability of FFXP and getting frustrated that I then need to navigate to the desired download location to get the file where I want.
FlashFXP Developer
bigstar
01-13-2013, 04:53 PM
Re: Better drag and drop support

I didn't forget about this suggestion.

I need to convert the remote file browser and tree navigation controls to use OLE drag/drop instead of the native VCL drag/drop, I have the code for this but I just haven't gotten around to it.

Using the SHChangeNotify method appears to work better then the method I was currently evaluating so I will switch to that (hopefully there are no unexpected limitations), thanks for the advice.
FlashFXP Developer
bigstar
01-13-2013, 07:39 PM
Re: Better drag and drop support

I just came across some notes I had on this feature and one issue that I noticed in the past was that it's not possible to use native and OLE drag at the same time, using OLE drag to allow dropping on the desktop/explorer via the remote browser will introduce some complications with how the local browser handles drag/drop from explorer, currently the local browser accepts native and OLE drop operations and this is how we tell internal and explorer drops apart, but if we switch to using OLE exclusively we'll need to add some type of extra handling to be able to tell them apart.

Also if we're creating a local temp dummy file for each drop operation we'll have to do this for every drag/drop operation because there is no way for us to know before hand if the drag/drop will be internal or to an external window.

Plus it looks like if there is a condition or situation where the drop to an external window fails to trigger a change file notification, the target folder will end up with the temp dummy file with no way to automatically remove it. (I have seen this a couple times during a few basic tests, which is somewhat discouraging).
FlashFXP Developer
bigstar
01-14-2013, 08:31 PM
Re: Better drag and drop support

<see the post below>
FlashFXP Developer
bigstar
01-16-2013, 09:37 AM
Re: Better drag and drop support

Update #2

Here's an experimental release with remote browser drop to desktop/explorer support.

ffxp4.3.0.1915.zip

Unzip the flashfxp.exe into your FlashFXP program folder, you may want to make a backup of your existing flashfxp.exe first.

I am not aware of any bugs or limitations, please let me know.

I need several people to test these changes before they can go into any official releases.

I have tested these changes on Windows 7 x64, Windows 2000.
FlashFXP Developer
bigstar
01-25-2013, 09:10 AM
Re: Better drag and drop support

This has been implemented in 4.3.0 build 1917 which is available via the website here

Posting Rules
You may not post new tickets

Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -5. The time now is 04:03 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)