How to drag and droping folders using C#
Hi I am pretty new to C# but I am trying to get the hang of it. I made my first program yesturday and I am looking to add to it. What it does: You drag and drop two files into the window and it checks to see if their exension is .jar or .jad if it is it renames it to _jar or _jad respectivly. I made this for my cellphone because when I put games or applications on it they need to be named a certain way. This is a snippet of code so don't worry about the {'s. the snippet is here: http://pastebin.ca/591040 So I got a working program.. but It is still a hassle to go into every single folder and drag the files so I needed to make it look in directories for files. So I made it check if it was a directory or not using if((System.IO.File.GetAttributes(file) & System.IO.FileAttributes.Directory) == System.IO.FileAttributes.Directory) { } then I was stumped. Please help me implement drag and drop folder support and maybe even drag and drop subfolder support. Thank you. -goatmale
Mahesh ChandPosted Jul 9, 2007, 11:34 AM
goatmale goatmalePosted Jul 9, 2007, 10:02 AM
Jan MontanoPosted Jun 28, 2007, 10:56 PM
I think I've seen a drag drop sample code just few days earlier somewhere in this forum. I was searching for it for you, but can't find it. If I'm not mistaken, it was a post by Mike. Although it's a drag drop sample using a listview, maybe it could be useful to you.
If I see it, I'll get back to you for the link. Or if anybody here has, please. Thanks.