Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to send the caption of form 1 to form2 in click even
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00760961
Message ID:
00760986
Vues:
13
>In the add button click event of form abc.scx i am doing this.
>
>DO FORM 'forms\cnaddform.scx' WITH THISFORMSET
>
>Now i want to send the abc.scx form caption to the form cnaddform.scx
>
>Thank you.

Since the child form is not the current active form until its Activate fires, you could use the following in the INIT of the child form instead of passing a parameter to the INIT:
local lcCaption
lcCaption = []
IF VARTYPE("_screen.activeform") = "O"
   lcCaption = _screen.activeform.caption
ELSE
   *!* there was no calling form
ENDIF
This is also a good way to get an object reference to the parent form for use as needed while the child form is instanciated. You could store that object reference in a property of the child form. Just set that property to .NULL. in the Destroy method of the child form.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform