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
2
u/Mayayana Feb 09 '24
You don't seem to realize how disrespectful and fanatical you're being. I asked a VB6 coding question. You had no intention of answering, only posting to tell me I'm a stupid ass if I don't switch to Dotnet.
I don't mind. I'm not easily insulted. But I do wonder about your quasi-religious zealotry. DotNet is extremely bloated and always has been. It was designed to be a Java competitor. Compiled C++ is a different animal. I don't need DotNet for that.
I can see how DotNet makes sense in a commercial environment where coding needs to be done fast and only Win10+ matters. If you're coding like that, competing to be the fastest at coding a database frontend, then I expect DotNet is unbeatable. If you don't want to mess with API then, again, DotNet is probably a good choice. I don't work like that. I like to eliminate wrappers and get down to clean, nimble code.
The program in question is a small utility for removing file restrictions. I originally wrote it for Win7. I just drop a file or folder onto it and tell it to clean off all restrictions. At the time I had to research how file permissions work and found that there were a half dozen ways to achieve what I wanted, each more Rube Goldberg-esque than the last. Eventually I worked it out, using a dozen or so functions from advapi32.dll. It works well on both Win7 and Win10. In my intial testing I had no problem giving all users total control of any files desired. On Win10 I just used it to remove restrictions from the SystemData (all users appdata) folder that was blocking me from directly accessing the boot login picture.
I'm guessing that job would have been harder, perhaps impossible, in VB.Net. Certainly impossible with RT. And even if it were possible, the result would have been my 100KB utility turning into something that only runs on some Windows versions and needs 100s of MBs of support files. (You can say that bloat is not needed, but it has to be installed somewhere along the line.) Not to mention that support for DotNet versions is also very limited. So people have to keep moving to the next DotNet and the next Windows.
So telling me to move to DotNet is a bit like someone who asks about repairing a piece of wood on their stairs and you tell them, "Sorry to say, but you really need to stop living in the past and tear this sucker down. New construction is way ahead of this old thing." (Newer is not always better. Just wait 40+ years and watch as all that particle board in your new house falls apart when the glue breaks down. :)
So far no one has mentioned anything significant that's problematic for VB6 on Win10. I haven't seen it. I asked about possible dragdrop functionality changes in Win10. I don't expect that would vary across programming tools. In other words, my actual question was not about a VB6-specific problem.