Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine calling program?
Message
De
04/05/2000 21:09:31
 
 
À
04/05/2000 18:19:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00366364
Message ID:
00366394
Vues:
12
Hi!

The shortest/fastest way that I know is as follows:

lcCalledBy = Program(Program(-1)-1)

Sarosh


>Seems like a simple thing to want to do, but I can't figure it out. Does anyone know how to determine which program or procedure called the currently executing program or procedure under VFP5? You'd think that there would be a SYS() function for this...
>
>In this particular case, I have a form that may be called "stand-alone" from the menu, or from within another program. If it's called from the menu, I need to open a bunch of files and close them on exit. If called from the other program, one of the files is already open and shouldn't be closed but the other should. I know I can do something kludgy with USED() and setting a form property (which is what I've done and it works fine) but I would have thought there was a more elegant method like a CALLEDFROM() function or something...
>
>Maybe something for the wishlist?
>
>-Arne
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform