![]() |
|
[.NET] Moving a file in vb - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Moving a file in vb (/showthread.php?tid=4462772) |
Moving a file in vb - scaa - Sep 25, 2014 So I have a .dll file that I want to move from my reasources to the selected path from FolderBrowserDialog1 with a button click but after trying a few different things I still cant find something that works, anybody got any ideas of how this could be done ? Thanks. 🤝 Here's what i've tryed; PHP Code PHP Code * - Nikey646 - Sep 25, 2014 A .dll stored in the resources would be stored as Bytes[]. This means you will want to do something along the lines of: Code Using(var Stream = new StreamWriter(FolderBrowserDialog1.SelectedPath)The above is C#, and you'll need to convert it to VB if you want to use it. It may also throw errors due to being typed of the top of my head. * - scaa - Sep 26, 2014 Tryed converting but it threw back some errors, not moved into C# yet either, thanks for the help though. 🤝 * - Nikey646 - Sep 26, 2014 (Sep 26, 2014 12:09 AM)scaa Wrote: Tryed converting but it threw back some errors, not moved into C# yet either, thanks for the help though. 🤝 Look up a tutorial for Writing Byte's to a file for VB, that's the basic concept that you want to look at. Sorry the code wasn't of more help. * - 8R4u2213 - Sep 26, 2014 do you get any error ? you can try writeallbytes Dim data() As Byte = System.IO.File.ReadAllBytes(fileToMove) System.IO.File.WriteAllBytes(path, data) |