Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command Line Parameters and Drag/ Drop Launch
Message
From
30/01/1999 22:12:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00182225
Message ID:
00182226
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform