Anybody mind a totally different approach (if only for discussion)?
If a form is closed by clicking on the X, the variable is turned to null. So, why not just check ISNULL(myform1)? If the issue is that the form may be hidden, you could just check the visible property.
In effect, the form is open if:
!ISNULL(myform1) AND myform1.visible
Or am I missing something?
Menachem
>>If I
>
>>DO FORM form1 NAME myform1
>>will WEXIST(myform1) result in .t.? What function will tell me if myform1 >is open?
>
>>Thanks,
>
>>dg
>
>Hi Doyle,
>
>If you want only to know if your form is open, you can use also something like the code below..
>
>
_ACTFORM = "Customer Maintenance"
>STORE WTITLE() TO ACTWIN
>IF _ACTFORM = ALLTR(ACTWIN)
> ***Your Code Block
>ELSE
> *** Your Code Block
>ENDIF
>
>
>
NOTE: FORMS CAPTION AND YOUR VARIABLE _ACTFORM SHOULD BE EXACTLY EQUAL, ITS CASE SENSITIVE