>>>Hi all,
>>>
>>>I did my dataenvironment class, and change the DEClass property in my Form Class.
>>>
>>>When I open the form class in class designer and close it. The Dataenvironment class is in memory, When I try modify get a 'can not modify a class that is in use' message, and still in memroy until close Visual Fox Pro.
>>>
>>>Do you know how release from memory or close it?
>>>
>>>Thanks a lot,
>>>
>>>Gavilán Ramírez
>>
>>close all
>>clear all
>>clear program
>>
>>Cetin
>
>Cetin,
>
>Thank you for your answer
>
>but when i do
>
>MODIFY CLASS myclass OF ...
>
>VFP says 'Remove Classes from Memory?' and later 'Can not modify a class that is in use'
>
>I do:
>
>Cancel
>Clear all
>Release all
>Clear Program
>Close all
>
>And VFP says the same,
>
>Do you have some idea?
>
>Regards,
Enrique,
I didn't install VFP9 yet.
In older versions normally it works for me in the order:
close all
clear all
However there is one exception to this, since your case happens with DE it might be that:
FormA and FormB have private datasessions.
FormA is instantiated with a name clause and it calls FormB. FormB accesses properties from FormA (but no object reference is held). FormB calls other forms with private sessions. FormC..N releases. FormB releases. FormA releases.
An unknown session is left open and you can't close it whatever command you call. Only way is to restart VFP.
I had this situation and could never solve (didn't happen in VFP6, started with VFP7). Then the solution I applied was to release FormA, on return recreate it.
Cetin