Yes Tony...EXCEPT...
You have to give a NEW name for each file. And there is no way to get the original name. You can not know what it was.
So, yes, you can "recreate" a directory with the image files. But it is not really a recreation, it is a whole new creation and you must give a new name
without knowing what the old name was.
So say, for example, you used the following for the images on the controls.
c:\Images\client.bmp
c:\Images\yadda.bmp
c:\Images\hoo-ha.bmp
c:\Images\thatOne.bmp
YES, you can get the images out and make new ones. But again, you MUST give them a new name, and you do NOT, and can not, get what the old name was.
It this is not important, then sure, by all means. You could extract the images, and use a counter, and make them:
Code:
SavePicture Me.cmdWithPicture.Picture, PictureName & _
"image_" & i & ".bmp"
i = i + 1
Getting something like:
c:\NewImages\image_1.bmp
c:\NewImages\image_2.bmp
c:\NewImages\image_3.bmp
c:\NewImages\image_4.bmp
And if that is OK, then fine. However, I will re-iterate that there is no real connection between the created files and the actual control it came from. The newly created image file is just a file.
It would take - and yes it could be done - additional code to extract the control name and say add it to the new filename.
If Control.Picture.Type <> 0 Then ' it HAS an image
sName = Control.Name & "_image"
Select Case Control.Picture.Type
Case 1
SavePicture Control.Picture, sName & ".bmp"
[/code]to get something like:
c:\NewImages\cmdYadda_image.bmp
c:\NewImages\cmdBlahBlah_image.bmp
c:\NewImages\cmdDoThis_image.bmp
Gerry