Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does WEXIST() tell if a form is open?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00906762
Message ID:
00906926
Views:
18
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" && Change to your Forms Caption
>STORE WTITLE() TO ACTWIN
>IF _ACTFORM = ALLTR(ACTWIN) && Means your form is Open...
>   ***Your Code Block
>ELSE
>   *** Your Code Block
>ENDIF
>
>
>NOTE: FORMS CAPTION AND YOUR VARIABLE _ACTFORM SHOULD BE EXACTLY EQUAL, ITS CASE SENSITIVE
Menachem Bazian, CPA
President
BC Consulting Services, Inc.
973-773-7276
Menachem@BazianCentral.com
Previous
Reply
Map
View

Click here to load this message in the networking platform