Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call an external Windows program with parameters?
Message
De
27/12/1996 23:42:40
 
 
À
27/12/1996 21:23:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00016088
Message ID:
00016092
Vues:
47
>VFP 3.0
>
>I need to execute an external Windows program with parameters that depends on one of the values of my textbox.
>
>For example, in the click event in one of my command button :
>
>LOCAL lcParams
>lcCmdline="TEST.EXE "+THISFORM.txtParam.Value
>* The following statement does not work!
>RUN lcCmdline
>
>I know if you put RUN "TEST.EXE" directly, the program will be executed but I need to input parameters to it too!
>
>Another question is although my program is a Windows EXE, VFP always display a DOS box first but later figured it out that it is a Windows executable so closes it. I find this very annoying and doesn't look too professional. How do you stop VFP from displaying a DOS box first?
>
>Ben
>PS : TIA and Season Greetings!
First question you shoul use RUN /N switch to stop DOS box from displaying and for second question use & macro substitution in front of your lcCmdLine.
Do something like this

LOCAL lcParams
lcCmdline="TEST.EXE "+THISFORM.txtParam.Value
RUN /N &lcCmdline
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform