Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form activation..
Message
 
To
15/07/1998 13:42:01
Larry Santos
Local Data System
Philippines
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00117703
Message ID:
00117714
Views:
22
>Hi,
>
> This is my last question for this topic.
>
> Could you please tell me the exact code for:
>
>
> 1. I check for a form if they already active.
> 2. if the form is not active I use do form "myform"
> 3. if its already active I want to activate it instead of do form "myform"
>
> Thanks

Larry,

Most of us have a form manager cobject that launches form and tracks there presence and status. With this type of class it becomes easy to figrue out what you are asking because you designed the method for storing the information.

To do this generically using the only the facilities in VFP you could try something like this;
* Form launch code
LPARAMETERS pcFormFile, pcFormTitle
* this cod requires that you pass the form's title as well as its name

LOCAL oForm
FOR EACH oForm IN _SCREEN.Forms
    IF oForm.Title = pcFormTitle
       oForm.Show()
       RETURN
    ENDIF
ENDFOR
DO FORM (pcFormName)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform