Thanks Dragan,
I agree with you. as long as I just refresh the visible panel no harm done.
But I am curious why the removeobject does not work. That's all
Thanks
So you left the US and went back to Serbia. I left Austria 36 years ago and might go back at least for some time per year to Austria once I am retired. Southern France and Thailand might have to share my time :-)
Peter
>>it's added to this form at instantiation via :
>>
>> IF NOT PEMSTATUS(THISFORM, [cntFILENOTE], 5)
>> THISFORM.NEWOBJECT([cntFILENOTE], [cntFILENOTE], FULLPATH([modules\vCPR5.vcx]))
>> THISFORM.cntFILENOTE.LEFT = 160
>> THISFORM.cntFILENOTE.TOP = 264
>> THISFORM.cntFILENOTE.HEIGHT = THISFORM.HEIGHT - 264
>> THISFORM.cntFILENOTE.ANCHOR = 15
>> THISFORM.cntFILENOTE.VISIBLE = .T.
>> ENDIF
>>
>>i swap out the containers when certain buttons are clicked to show different data as needed. this is a form to replace an existing query form where all data are collected before the form becomes visible. I am just trying to speed things up and only bring in data which are needed by all users. any less frequently used data are recalled by buttons
>
>I don't think you're gaining anything much by removing objects. Delayed instantiation, yes, we all do that and it's a nice trick - you don't waste time instantiating objects which aren't needed, and may not be needed at all (the user may not even visit that part of the form). But destroying objects which may be needed again - you do unnecessary work. Just hide it and, if needed again, show it.
>
>At least that's what I do in such cases - you may have your reasons.
Peter Cortiel