Of some reason you make me think about the whole situation in a different way. I spend almost all the weekend to go step by step through the code and could finally fix it. From my point of view this is a bug in VFP. So here the solution:
During start-up I set several paths (with set path to pathe1, path2 etc.) where the program should search the images. As a consequence I am using the image object only with the file name (e.g. picture1.jpg) without path to open the picture, e.g. thisform.image1.picture = m.picture, where m.picture is an variable containing the image name (see above). With closing the form or object the image will be not closed, exept the default path is identic with the path where the image is located, what was not the case.
In the case I am opening the image with the full path in the variable everything works fine and with closing the form or object the image object will be released as well and could be als renamed in windows explorer.
Andreas
P.S. clear all does not help to solve this problem
> > Probably a misunderstanding,
> >
> > if I close down foxpro the file is released. The file is not released if I close the compiled application but the vfp environment remains open.
> >
>
> Oh, sorry. Does CLEAR ALL help?
>
>
-BP
> www.peisch.com