the zip extraction magic! I don't think this is documented anywhere. Anyway: problem solved! (And a free license for jacky
Drag-N-Drop - Not drop target
Forum rules
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
I'm having some problems with this. I'm using WinRAR and trying to drag a file out of a .zip file into a directory in Tracker. If there is a file selected in the listview part of Tracker, that file gets copied to whatever directory I'm dragging to instead of the file I want to extract from the .zip. If no file is selected, nothing happens.
If I use AlZip to drag files out of, I get the following message box error and no files get copied:
I really appreciate you looking into this drag-n-drop stuff...once we get it working, it'll be very nice.
If I use AlZip to drag files out of, I get the following message box error and no files get copied:
Code: Select all
---------------------------
Error Copying File or Folder
---------------------------
Cannot copy file: Cannot read from the source file or disk.
---------------------------
OK
---------------------------
Justin
Windows 7 Professional
Windows 7 Professional
Actually, it doesn't matter if I drop on the treeview or the listview, I get the same behavior.admin wrote:Oh, you are dropping onto the tree view... I was so enthusiastically experimenting with the list view that I forgot to update the tree view code... check out the next upload...
Justin
Windows 7 Professional
Windows 7 Professional
-
admin
- Site Admin
- Posts: 64846
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Oh.JustinF wrote:Actually, it doesn't matter if I drop on the treeview or the listview, I get the same behavior.admin wrote:Oh, you are dropping onto the tree view... I was so enthusiastically experimenting with the list view that I forgot to update the tree view code... check out the next upload...
You tried only WinRar, right?
I tried WinRAR and AlZip. AlZip gives me the "Cannot copy file..." error I posted above. I will install WinZip here in just a second and see what happens.admin wrote:You tried only WinRar, right?
Justin
Windows 7 Professional
Windows 7 Professional
Ok, WinZip 10 seems to work fine if I drop the files on the listview. If I drop on the treeview I get the following message box:
Code: Select all
---------------------------
Error Moving File or Folder
---------------------------
Cannot move file: Cannot read from the source file or disk.
---------------------------
OK
---------------------------
Justin
Windows 7 Professional
Windows 7 Professional
Same here. But with WinRAR it's quite different.JustinF wrote: WinZip 10 seems to work fine if I drop the files on the listview. If I drop on the treeview I get the following message box:
Cannot move file: Cannot read from the source file or disk.
Dropping on the listview will not do anything is no file is selected, or I'll get an error (Cannot copy [selected_filename]: source & dest are the same.)
On the treeview it will copy the selected file if there's one, or do nothing if no files were selected.
-
admin
- Site Admin
- Posts: 64846
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Hm hm hm... this gets ever more strange. Winzip sends Effect=1 to OLEDragOver, but WinRAR sends Effect=3 and this is bad for a lot of complicated reasons... to put it short: you can't have dropping from WinRAR and autodetection of the default file operation (watch the drag cursor change between copy and move when you drag over different targets...) at the same time.
Gotta sleep...
Gotta sleep...
There a bit I don't understand, there is no autodetection (copy or move) when dragging from any soft, WinRAR or WinZIP, and it should be that way. I mean default action when coming out of a compressed file should always be copy, doesn't matter if we'll extract on the same drive as the compressed file is... or did I get that part wrong?admin wrote:Hm hm hm... this gets ever more strange. Winzip sends Effect=1 to OLEDragOver, but WinRAR sends Effect=3 and this is bad for a lot of complicated reasons... to put it short: you can't have dropping from WinRAR and autodetection of the default file operation (watch the drag cursor change between copy and move when you drag over different targets...) at the same time.![]()
Also, I think that could be it. Effect=1 means copy right? So I guess WinZIP does that cause it is always a copy. WinRAR probably uses 3 because it can handle "moving" too.
I mean even with WinZIP & explorer you cannot "move" a file using drag&drop. Even if you hold Shift it will still just be a simple extraction (copy).
But, with WinRAR, if you hold Shift then WinRAR will remove the file(s) from the archive when done!! (aka you "moved" them out) ! That might be why they don't act the same.... (and WinRAR is the best!!
-
admin
- Site Admin
- Posts: 64846
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Yes, that's what I meant. And yes, there is a way and I found itjacky wrote:...or did you mean it's either allowing d&d from WinRAR or autodetection for "regular" d&ds ?? -- if so, explorer does it, so there must be a way....)
Cool indeed! And works with TV3 now, toojacky wrote:... But, with WinRAR, if you hold Shift then WinRAR will remove the file(s) from the archive when done!! (aka you "moved" them out) ! That might be why they don't act the same.... (and WinRAR is the best!!)
Cool! Both WinZip and WinRar work. Unfortunately AlZip still gives the same error.
I'm not completely tied to AlZip, but I like the idea of an (un)compression program that doesn't nag you...anyone know of another one?
Thanks for your hard work on this one, Donald. Next time you're in Omaha lunch is on me.
Thanks for your hard work on this one, Donald. Next time you're in Omaha lunch is on me.
Justin
Windows 7 Professional
Windows 7 Professional
Well done, it's all great!admin wrote:Cool indeed! And works with TV3 now, toojacky wrote:... But, with WinRAR, if you hold Shift then WinRAR will remove the file(s) from the archive when done!! (aka you "moved" them out) ! That might be why they don't act the same.... (and WinRAR is the best!!)
Just one little thing, when doing a drag&drop from WinRAR and holding Shift, could you change the cursor so the little plus sign (for copy) goes away? Could be confusing I think since the file will be removed from the archive....
-
admin
- Site Admin
- Posts: 64846
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
I'd love to, but it's not possible! (Try it with your test project) I never managed to change the mouse cursor when dragging onto TrackerV3 from another app (even from another TV3 instance). The source window apparently owns the cursor...?jacky wrote:Just one little thing, when doing a drag&drop from WinRAR and holding Shift, could you change the cursor so the little plus sign (for copy) goes away? Could be confusing I think since the file will be removed from the archive....
Damn that wasn't easy to find! Ok so seems that it is owned by the source, but you have to let it know what to do.admin wrote:I'd love to, but it's not possible! (Try it with your test project) I never managed to change the mouse cursor when dragging onto TrackerV3 from another app (even from another TV3 instance). The source window apparently owns the cursor...?jacky wrote:Just one little thing, when doing a drag&drop from WinRAR and holding Shift, could you change the cursor so the little plus sign (for copy) goes away? Could be confusing I think since the file will be removed from the archive....
To do that, inside the OLEDragOver event you'll need to change the value of Effect. So changing it to vbDropEffectMove will inform the source that it will be a move operation, and the cursor will be update as so.
In my little test project, it works (dragging from TV3, WinRAR, etc) if I add this:
Code: Select all
Private Sub List1_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
Select Case Shift
Case 0, 2: 'classic, or wilh Ctrl
Effect = vbDropEffectCopy
Case 1: 'Shift
Effect = vbDropEffectMove
Case Else: 'Alt, Shift+Ctrl, etc so we cancel this (unsupported)
Effect = vbDropEffectNone
End Select
End Sub
XYplorer Beta Club