Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Command Line Parameters and Drag/ Drop Launch
Message
De
30/01/1999 22:12:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00182225
Message ID:
00182226
Vues:
12
>Is it possible to create a compiled application (.exe) that can accept command line parameters such as a file name? If so, how do you code for this in the program?

Yes, it's possible. Your main prg must contain a PARAMETER or LPARAMETER command at its top. From there, it's like having a usual procedure. The only difference is that all parameters received by an exe are of char string type. The problem with the file names is that they may contain spaces. In this case, the operating systems considers them as separate parameters and will pass them to you as multiple parameters.

>Also, can you create an application that can be launched by dropping a file (or shortcut) icon on the application?

I never tested this, but I believe that this is done automatically in Win 95, NT.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform