Jim,
you're pointing a specific KiXGUI behavior :
Basically, KiXGUI provide a COM interface between KiXtart (or any language able to use COM) and a physical form and/or control. The bad part with such object is that a COM object exists as long as any variable has a reference to it (this is the way M$ done it)

With that, let's play with it
First, you're creating a form and put it into a variable called $myform. Using $myform, it's possible to do what you want. But now, we are just after the form destruction state: the physical form doesn't exist, the internal reference to this form doesn't exist any more in KiXGUI, but you're still having your $myform variable, now pointing to an inexistant physical form, and until $myform is destructed, the COM object is always here, managing a non-existing form

And so it's the choice i've done : only KiXGUI is able to destruct forms/controls it created, and this only happened when the KiXGUI memory copy is killed (so when your script is finished)
Also, as KiXGUI is able to manage many forms as collection, you can create as many forms as you want without the need to put them in a variable (KiXGUI is already doing that)

Finally, the bad part is that you can't destruct any form, but it's possible to reuse a form with clearing or hidding controls (remember you can also hide/show forms)
And please note that controls are handled in the same way as forms

If this explanation need more light, let me know about, as sometimes i can be darker than London fog [Wink]

[ 14 March 2002, 20:14: Message edited by: Alex.H ]
_________________________
? getobject(Kixtart.org.Signature)