Colin
It's not a bug or memory problem in VFP.
You should stop relying on memvar names like you replied to JimB.
Set your form Name property to a unique value for each form. I happen to use frmSCXNameGoesHere
Let your menu item to start the form simply do this:
do form XYZ123
If you want a menu item to close the form use code to iterate the _screen.Forms[] collection:
for i = 1 to _screen.FormCOunt
if ( _screen.Forms[i].Name = "frmXYZ123" )
if ( _screen.Forms[i].QueryUnload() )
_screen.Forms[i].Release()
endif
endif
endfor
>You are quite right. Debug shows no trace of the form.
>
>And yet - if I write a simple program to open and release the form by name it works fine and the Windows list shows no open forms. But if I run my program the form does not show up in debug but it shows in the Windows list and I can click on it and there is my form.
>
>Is this a bug or sime sort of memory problem?