Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form activation..
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00117703
Message ID:
00118013
Vues:
32
>>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)
>
>
Hi,

Instead of searching through 'forms' array. you can just check it with
WEXIST().

Bye
- Jayesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform