Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Know the name tthe form1 that call form 2
Message
 
À
24/05/2002 06:14:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00660923
Message ID:
00660951
Vues:
9
This message has been marked as a message which has helped to the initial question of the thread.
>You can pass as parameter calling form name. In Init event of form3 you will know caller form name.
>Another possibility is to set global flag with caller form name. You can check this flag on the Load event (if Init is too late for you).

There is also another trick. :)

When you run one form from another, in Init() of the child form you may access the properties and methods of the parent form directly, without passing the parameters - i.e:
thisform.someProperty =_screen.activeform.Name
or
thisform.someControl.Value =_screen.activeform.someControl.Value
This is based on the fact that when the child form runs its .Init() it is not an Activeform yet, because its .Activate() didn't fire so far, so the calling form still stays active at that time.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform