Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best method to determine if form is active
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00514365
Message ID:
00514571
Views:
10
Larry,

Thanks for the info and the code. I tried it out (substituting using the form name instead of the caption) and it works like a charm. Thanks again for your assistance.

Al

>Allan,
>What have you tried? The following (or something like it) should work:
>lparameters tcCaption
>local oform
>oform = .NULL.
>With _Screen
>   for lxx = 1 to .FormCount
>      if upper(.Forms[lxx].BaseClass) = "FORM" ;
>         and upper(.Forms[lxx].Caption) = upper(tcCaption) then
>         oform = .Forms[lxx]
>         exit
>      endif
>   endfor
>Endwith
>
>return oform
>
>In your calling code, pass the caption in. If it finds it, it will return an object reference to that form and you can call the Show method. If it returns a NULL value, then you know to issue a DO FORM.
>
>HTH.
Al Williams

Anola MB, CANADA
Previous
Reply
Map
View

Click here to load this message in the networking platform