Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp6run, exe, vfp6 handle startup parameters differentl
Message
 
 
To
05/04/2002 19:32:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00641692
Message ID:
00641695
Views:
12
This message has been marked as the solution to the initial question of the thread.
According to the VFP help VFP6RUN doesn't accept parameters for the application it runs. I think you can build your own exe to replace VFP6Run.
* myvfprun.prg
LPARAMETRERS tcAppName, tcParam1
DO (tcAppName) WITH tcParam1
Build myvfprun.exe and use it to launch your application
myvfp6run bcmain 0
Rememeber, that all parameters're passed into EXE as strings.



>I wanted to pass a parameter to my application at startup, using the vfp6runtime. But it doesn't work.
>
>The entry point to my program is bcmain:
>
>
>In my shortcut I tried:
>
>c:\windows\system\vfp6run bcmain 0
>
>
>**bcmain.prg
>lparameters tcProgram
>?type('tcProgram')
>** when started from runtime as shown above, returns L - no matter what the parameter is, 0, "0", '0'
>This is a problem for me, since I want to use the runtime in this environment, not always compile an exe.
>
>However, when I compile to an exe, the type is returned as C, regardless of whether I use 0, "0", '0'
>This I can live with, but I prefer it to understand the data type
>
>
>do bcmain with "0" from command window, type is c
>do bcmain with 0 from command window, type is n
>This is fine of course
>
>Can someone explain this behavior, or better yet, tell me if there is a way to pass a parameter to the startup program using the runtime?
>
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform