Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One Form to Another
Message
 
À
05/12/1999 11:16:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00298054
Message ID:
00298867
Vues:
18
Ed...

You really need to clarify your posts more. Remember, there are a lot of newbies out there that may not have some of the insight you, I, or somebody else may have.... Should'nt a post reflect reality..???? Are you saying that you don't use the code you post??? Why would you post code that you would not use???

Please explain...




>If you or me have more than one instance of the same form then you may either instantiate them with different names or use some custom property to identify a form repliable way. I hope you understand that in reality (i mean in real propjects I used to develop) i use more sophisticated code, I use my own form manager mechanism.
>
>>Ed....
>>
>>What happens when you have two or more instances of the same form?
>>Also, assuming only one instance can exist, the following code might work a bit better<s>:
>>
>>For Each oForm in _Screen.Forms
>> If Upper(oForm.Name)=="MYFIRSTFORM" && form found
>> oForm.Mymethod
>> Endif
>>Next oForm
>>
>>They say details are everything...
>>
>>
>>>The best way is to provide some kind of communication link between the forms. In simplified case (if the second form is modal and called from the first one) you may just return value (note) back. Also, you can pass parameter to the calling form. In more common case, when you have two modeless forms, you may force the second form (in some method) to look for the first one and call some method there, e.g.
>>>
>>>For Each oForm in _Screen.Forms
>>> If oForm.Name=="MYFIRSTFORM"  && form found
>>>   oForm.Mymethod   && do something there, e.g. cnahge textbox value
>>> Endif
>>>Endfor
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform