>I have a VLS (Very Large Scale)database application, which allows moving rapidly from one form to another and back.
>I have noticed that in several cases, that a user is able to get multiple instances of the same form running, which may be hidden behind the main screen.
>
>How can I test for whether or not a form is already running, and just activate it, instead of DOing another instance?
Doug,
There are many ways to do it. Since you're only dealing with its existence or not I think this one is simple (and assuming you're using Do form instead of createobject) :
LPARAMETERS tcSCXName
IF type(tcSCXName) = "O" ;
and !isnull(eval(tcSCXName)) ;
and eval(tcSCXName+".baseclass") = "Form"
&tcSCXName..show()
ELSE
DO form (tcSCXName)
ENDIF
This works because the first instance of a form always referencable by its SCXName.
Cetin