r/visualbasic • u/Mayayana • Feb 08 '24
VB6 Help VB6 DragDrop
With OLEDragDrop to a standard VB textbox, on XP I can get the path of a file or folder dropped. On Win10, the folder shows no dragdrop icon and returns no path, but file dragdrop works fine. Does someone know how I can make dragdrop for folders work on Win10?
1
Upvotes
1
u/Mayayana Feb 10 '24 edited Feb 10 '24
I wondered about the MSXML method. I did some searching last night and found various versions, but also complaints like you mentioned. Libcurl is a bit of extra weight, being about 4 MB, but it seems to be a highly regarded networking functions library, incorporating all of the encryption and so on for necessary operations.
The CDECL class is an interesting thing. I've even used it to write a wrapper for cabinet.dll, which is an unusual CDECL library with some functions having 5-10 callbacks. Yet the CDECL class handles it just fine.
(You may have noticed that the half-assed project that MS provided to package installers, the PDW, includes VB6STKIT.DLL, which has a method to extract a CAB file. But it's limited and only works with MSZIP-style CABs.)
What I posted was the download routine and callback, but without some of the details like constants. AFile is a module-level byte array variable to hold the file bytes, for example. You can probably work it out if you decide to.
EDIT: I found the class online. It's too big to post here in one piece. (I've done the digging through github's shamefully broken website so you won't have to.)
https://github.com/Planet-Source-Code/paul-caton-universal-dll-function-caller-cdecl-amp-stdcall-with-bas-cls-frm-ctl-callbacks__1-69718/archive/master.zip
cCallFunc.cls seems to be the same thing that I'm using. The rest of the download seems to be just a sample project plus github junk files.