Copy Image

MFS

Member
Joined
Feb 6, 2007
Messages
10
Programming Experience
Beginner
Hello,

I need help copying an image file into a separate directory. For simplicity, image a form with 3 picturebox's and 3 buttons.

The buttons open up an openfiledialog. The user can select an image from a file on their computer and this image will show in the corresponding picturebox.

I would like to copy these files to a separate directory and rename them sequentially. Like Pic1.jpg, Pic2.jpg, Pic3.jpg, and so on.

And if the user clears the picturebox or changes the picture I need the file that was copied to be deleted.

I have little programming experience so I don't know if this is asking a lot but I am eager and willing to learn.

Any help would be appreciated. Thank you.
MFS
 
John,

Thank you for the links. Extremely useful for me.

However, I am still having trouble trying to understand how to increment the filename each time a pic is saved...any thoughts?

Thanks again for your help.

MFS
 
You could keep a integer counter in your application settings, then add that up for each time and always save to "filename" & my.settings.counter.tostring & ."ext".
 
Back
Top