Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Parameter to running program
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01486218
Message ID:
01486220
Vues:
64
The first line of your "main.prg" must have a PARAMETERS statement to accept the parameters.

Then, just pass them on the command line like:

MyApp param1, param2, param3 ...

The parameters will go into the program as strings.


>Does anyone have code to pass parameters in the .exe command line to a running application.
>
>I want to include a link to the application in an e-mail and have the application start using the record seek info passed by the e-mail. And I need to account for the possibility that the application is already running. I can do this with PARAMETERS statement, but I also have a trap in the PRG to prevent a second instance of the program from starting. So now I have that trap "drop a turd" with the record search info using fcreate() and then I have a timer in the program file look for the turd every 2 seconds and go to that record. Crude but it works.
>
>Anyone have a better idea?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform