Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference one form from another
Message
De
18/07/2000 00:11:18
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00393630
Message ID:
00393642
Vues:
20
>Whenever you issue a DO FORM command or CREATEOBJECT('form'), an object reference to your form is added to a property of _Screen called Forms. This is an array property that has references to all active forms.
>
>To loop through it:
>lparameter tcformname
>local luretval
>luretval = .NULL.
>for lxx = 1 to _Screen.Formcount
>   if upper(_Screen.Forms[lxx].BaseClass) = "FORM" ;  && could be a toolbar
>      and upper(_Screen.Forms[lxx].Name) = upper(tcformname) then
>      luretval = _Screen.Forms[lxx]
>      exit
>   endif
>endfor
>return luretval
>Check the return value with ISNULL() and if it isn't, then you now have an object reference to your other form.
>
>HTH.


O.K. Now I see how it gets the "reference number" of the form that I want to operate on, but how does it work in an expression? For instance, if I want to refresh() this form, would I just say:

luretval.refresh()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform