Mark & Barbara
I also have a Windows Manager Class.
In the past I always used an array to store the references to any
open windows. I updated it to a collection as soon as I got VFP8.
The class has an OpenWindow function that takes the name of the
form class to instantiate. It creates the instance, incrementing
the Name property (MyForm1, MyForm2...), stores it to the collection
and returns an object reference to the newly created form.
The in the CloseForm method on the form, I call
oApp.oWindows.CloseForm(ThisForm.Name)
Which does:
LPARAMETERS cFormName
FOR EACH oForm IN This.oWindows
IF oForm.Name == cFormName
RELEASE oForm
ENDIF
NEXT
I have subclassed it for use with toolbars, and I've added various
PEMS along the way, and I've used it since with no problems.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people