Jalouly Posted November 9, 2011 Posted November 9, 2011 hi all, this is my first post here, i stored 2 files in my application resources in VB.NET and i want to copy these 2 files to a location using a folder dialog i tried this code but it didn't work If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then File.Copy(My.Resources.MyFile, FolderBrowserDialog1.SelectedPath) any code i can try? Regards. Quote
Administrators PlausiblyDamp Posted November 9, 2011 Administrators Posted November 9, 2011 IIRC File.Copy takes a file name as a string and the resource is treated as a stream, you can't just use the two things interchangeably. You would need to open the resource as a stream and copy the contents to the destination. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.